summaryrefslogtreecommitdiffstats
path: root/dimension/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/parse.c')
-rw-r--r--dimension/parse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 177a96c..6de30c9 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -660,6 +660,10 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
dmnsn_make_ast_integer(&ret, -n);
break;
+ case DMNSN_AST_NOT:
+ dmnsn_make_ast_integer(&ret, !n);
+ break;
+
case DMNSN_AST_ABS:
dmnsn_make_ast_integer(&ret, labs(n));
break;
@@ -755,6 +759,10 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
dmnsn_make_ast_float(&ret, -n);
break;
+ case DMNSN_AST_NOT:
+ dmnsn_make_ast_integer(&ret, !n);
+ break;
+
case DMNSN_AST_ABS:
dmnsn_make_ast_float(&ret, fabs(n));
break;
@@ -1389,6 +1397,7 @@ dmnsn_eval(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
case DMNSN_AST_DOT_T:
case DMNSN_AST_DOT_TRANSMIT:
case DMNSN_AST_NEGATE:
+ case DMNSN_AST_NOT:
case DMNSN_AST_ABS:
case DMNSN_AST_ACOS:
case DMNSN_AST_ACOSH: