diff options
author | Adrian Kummerlaender | 2017-04-13 12:25:41 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2017-04-13 12:25:41 +0200 |
commit | 11d6996d9b56b537946b2894a66f56f5cf3576b8 (patch) | |
tree | 59d82de776f445a255099b0b08915635f485457b /src | |
parent | d5ea77e49e30ad751678f90123f891344642a36c (diff) | |
download | slang-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
Diffstat (limited to 'src')
-rw-r--r-- | src/primitives/eval.d | 10 | ||||
-rw-r--r-- | src/primitives/impl.d | 6 |
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; } |