From aeaa9a4e80244a5c66b1afe7e6ee1bcf48e70766 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 29 Apr 2010 16:21:55 -0600 Subject: Add a generic list type. --- dimension/parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dimension') 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)); -- cgit v1.2.3