summaryrefslogtreecommitdiffstats
path: root/dimension/parse.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-23 22:29:10 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-23 22:29:10 -0500
commita7bb341bc683f4d43bdddadd66f72234127b9060 (patch)
tree60a0cea17cc790e4c16c302ecd88f67ef6fdbde9 /dimension/parse.h
parent6b4b62ab01309462608ad1c885c07be5648c2cf1 (diff)
downloaddimension-a7bb341bc683f4d43bdddadd66f72234127b9060.tar.xz
Add eager arithmetic evaluation to parser.
Diffstat (limited to 'dimension/parse.h')
-rw-r--r--dimension/parse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dimension/parse.h b/dimension/parse.h
index 956c946..5801cdf 100644
--- a/dimension/parse.h
+++ b/dimension/parse.h
@@ -57,6 +57,10 @@ dmnsn_array *dmnsn_parse(const dmnsn_array *tokens);
/* Free an abstract syntax tree */
void dmnsn_delete_astree(dmnsn_array *astree);
+/* Evaluate an arithmetic expression */
+dmnsn_astnode dmnsn_eval_scalar(dmnsn_astnode astnode);
+dmnsn_astnode dmnsn_eval_vector(dmnsn_astnode astnode);
+
/* Print an S-expression of the abstract syntax tree to `file' */
void dmnsn_print_astree_sexpr(FILE *file, const dmnsn_array *astree);