summaryrefslogtreecommitdiffstats
path: root/dimension/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-09 20:51:02 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-09 20:51:02 -0500
commit06b653e922cd36006f0c86b7e015109e5c0b8923 (patch)
treeb45e89ae297e670f7b92c10da30d2ecd46822ac3 /dimension/parse.c
parentd411e681e571ac054352b9665487f10037d9325d (diff)
downloaddimension-06b653e922cd36006f0c86b7e015109e5c0b8923.tar.xz
New dmnsn_assert() macro for invariant violations.
Diffstat (limited to 'dimension/parse.c')
-rw-r--r--dimension/parse.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 6951974..6ca6326 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -406,8 +406,7 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
break;
default:
- dmnsn_error(DMNSN_SEVERITY_HIGH,
- "Attempt to evaluate wrong unary operator.");
+ dmnsn_assert(false, "Attempt to evaluate wrong unary operator.");
}
ret = dmnsn_copy_astnode(astnode);
@@ -691,8 +690,7 @@ dmnsn_eval_binary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
break;
default:
- dmnsn_error(DMNSN_SEVERITY_HIGH,
- "Attempt to evaluate wrong binary operator.");
+ dmnsn_assert(false, "Attempt to evaluate wrong binary operator.");
}
ret.type = DMNSN_AST_INTEGER;
@@ -779,8 +777,7 @@ dmnsn_eval_binary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
break;
default:
- dmnsn_error(DMNSN_SEVERITY_HIGH,
- "Attempt to evaluate wrong binary operator.");
+ dmnsn_assert(false, "Attempt to evaluate wrong binary operator.");
}
ret.type = DMNSN_AST_FLOAT;