diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-02 22:30:34 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-02 22:30:34 -0500 |
commit | 0ede6bd34a27a01fe61ef8221ed38c8525c89e03 (patch) | |
tree | 6da8e4175b08f0c4f43fb2e445f671c887ae95a6 /dimension/common.rules | |
parent | c07038c627a5601bf331b5c755b9fcce02249fe3 (diff) | |
download | dimension-0ede6bd34a27a01fe61ef8221ed38c8525c89e03.tar.xz |
Use dmnsn_new_ast_integer() in parsers.
Diffstat (limited to 'dimension/common.rules')
-rw-r--r-- | dimension/common.rules | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/dimension/common.rules b/dimension/common.rules index ef4b3dd..2725925 100644 --- a/dimension/common.rules +++ b/dimension/common.rules @@ -437,14 +437,7 @@ COLOR_KEYWORD_GROUP: COLOR_KEYWORD_GROUP_INIT COLOR_KEYWORD_ITEM ; COLOR_KEYWORD_GROUP_INIT: /* empty */ { - dmnsn_astnode zero = - dmnsn_new_astnode(DMNSN_AST_INTEGER, @$); - zero.ptr = malloc(sizeof(long)); - if (!zero.ptr) - dmnsn_error(DMNSN_SEVERITY_HIGH, - "Failed to allocate room for integer."); - *(long *)zero.ptr = 0; - + dmnsn_astnode zero = dmnsn_new_ast_integer(0); $$ = dmnsn_eval_vector(zero, symtable); dmnsn_delete_astnode(zero); } |