diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-04-29 16:21:55 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-04-30 09:52:26 -0600 |
commit | aeaa9a4e80244a5c66b1afe7e6ee1bcf48e70766 (patch) | |
tree | df6be7525af3e537e22beb13649a473434628835 /dimension | |
parent | 3133fafb0fbd44d687d5549a060260dd7fb93bcf (diff) | |
download | dimension-aeaa9a4e80244a5c66b1afe7e6ee1bcf48e70766.tar.xz |
Add a generic list type.
Diffstat (limited to 'dimension')
-rw-r--r-- | dimension/parse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dimension/parse.c b/dimension/parse.c index c50d03f..802a3e5 100644 --- a/dimension/parse.c +++ b/dimension/parse.c @@ -683,6 +683,7 @@ dmnsn_eval_unary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable) ret.type = DMNSN_AST_VECTOR; dmnsn_astnode op = dmnsn_copy_astnode(astnode); + dmnsn_array_resize(op.children, 1); for (i = 0; i < DMNSN_VECTOR_NELEM; ++i) { dmnsn_array_get(rhs.children, i, dmnsn_array_at(op.children, 0)); dmnsn_astnode temp = dmnsn_eval_unary(op, symtable); @@ -1286,6 +1287,7 @@ dmnsn_eval_binary(dmnsn_astnode astnode, dmnsn_symbol_table *symtable) ret.type = DMNSN_AST_VECTOR; dmnsn_astnode op = dmnsn_copy_astnode(astnode); + dmnsn_array_resize(op.children, 2); for (i = 0; i < DMNSN_VECTOR_NELEM; ++i) { dmnsn_array_get(lhs.children, i, dmnsn_array_at(op.children, 0)); dmnsn_array_get(rhs.children, i, dmnsn_array_at(op.children, 1)); |