aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-04-18 10:54:33 +0200
committerAdrian Kummerlaender2017-04-18 10:54:33 +0200
commitfa1bdcab3f371f1ec79621fbd890f3ddd8b5019c (patch)
tree1e080bb8eecfdf7e275d9cecccd8a8db174ae80a
parent44a8573c4d4081552320c80bf9a2ed3eaba6c91c (diff)
downloadslang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar.gz
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar.bz2
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar.lz
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar.xz
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.tar.zst
slang-fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c.zip
Rename `over` to `ovr` so that all stack operations are three letter words
-rw-r--r--README.md2
-rw-r--r--source/primitives/core.d4
2 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 2392094..968efd1 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ Currently implemented primitives:
| `pop` | Remove uppermost stack element |
| `dup` | Duplicate top-of-stack |
| `swp` | Swap the first two stack elements |
-| `over` | Place a copy of the second stack element on top-of-stack |
+| `ovr` | Place a copy of the second stack element on top-of-stack |
| `rot` | Rotate the top three stack elements |
| `true` | Write true boolean value to top-of-stack |
| `false` | Write false boolean value to top-of-stack |
diff --git a/source/primitives/core.d b/source/primitives/core.d
index e3c2eeb..46ed890 100644
--- a/source/primitives/core.d
+++ b/source/primitives/core.d
@@ -25,7 +25,7 @@ bool handle(string word) {
case "pop" : unary_op_stack_pop; break;
case "dup" : unary_op_stack_dup; break;
case "swp" : binary_op_stack_swp; break;
- case "over" : binary_op_stack_over; break;
+ case "ovr" : binary_op_stack_ovr; break;
case "rot" : ternary_op_stack_rot; break;
case "true" : nullary_op_value_bool(true); break;
case "false" : nullary_op_value_bool(false); break;
@@ -97,7 +97,7 @@ void binary_op_stack_swp() {
stack.push(a);
}
-void binary_op_stack_over() {
+void binary_op_stack_ovr() {
auto b = stack.pop;
auto a = stack.pop;