aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-04-13 12:25:41 +0200
committerAdrian Kummerlaender2017-04-13 12:25:41 +0200
commit11d6996d9b56b537946b2894a66f56f5cf3576b8 (patch)
tree59d82de776f445a255099b0b08915635f485457b
parentd5ea77e49e30ad751678f90123f891344642a36c (diff)
downloadslang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar.gz
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar.bz2
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar.lz
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar.xz
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.tar.zst
slang-11d6996d9b56b537946b2894a66f56f5cf3576b8.zip
Rename conditional primitive implementation to fit overall naming scheme
-rw-r--r--src/primitives/eval.d10
-rw-r--r--src/primitives/impl.d6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/primitives/eval.d b/src/primitives/eval.d
index d62fdb8..8b080e2 100644
--- a/src/primitives/eval.d
+++ b/src/primitives/eval.d
@@ -14,9 +14,9 @@ bool evaluate(string word) {
if ( drop_mode ) {
switch ( word ) {
case "then":
- return conditional_then;
+ return n_ary_conditional_then;
case "else":
- return conditional_else;
+ return n_ary_conditional_else;
default:
return true;
}
@@ -30,11 +30,11 @@ bool evaluate(string word) {
case "@":
return unary_op_variable_resolve;
case "if":
- return conditional_if;
+ return unary_conditional_if;
case "then":
- return conditional_then;
+ return n_ary_conditional_then;
case "else":
- return conditional_else;
+ return n_ary_conditional_else;
case "+":
return binary_op_add;
case "*":
diff --git a/src/primitives/impl.d b/src/primitives/impl.d
index dd257cc..9fddee5 100644
--- a/src/primitives/impl.d
+++ b/src/primitives/impl.d
@@ -31,17 +31,17 @@ bool unary_op_variable_resolve() {
return true;
}
-bool conditional_if() {
+bool unary_conditional_if() {
drop_mode = !stack.pop.get!bool;
return true;
}
-bool conditional_then() {
+bool n_ary_conditional_then() {
drop_mode = !drop_mode;
return true;
}
-bool conditional_else() {
+bool n_ary_conditional_else() {
drop_mode = false;
return true;
}