summaryrefslogtreecommitdiffstats
path: root/dimension/directives.rules
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-04-04 19:25:54 -0400
committerTavian Barnes <tavianator@gmail.com>2011-04-06 15:01:06 -0400
commit629cad2c7578aea62761ba2e1810356138b57480 (patch)
tree56e89b6efc240c4c90b38997e0ceea844df005b3 /dimension/directives.rules
parent5a535f9fac3f4b82f0b154b4c81fd1e2a8d62802 (diff)
downloaddimension-629cad2c7578aea62761ba2e1810356138b57480.tar.xz
Don't make empty child arrays when parsing.
Diffstat (limited to 'dimension/directives.rules')
-rw-r--r--dimension/directives.rules9
1 files changed, 3 insertions, 6 deletions
diff --git a/dimension/directives.rules b/dimension/directives.rules
index a3c53d2..b9c6cc6 100644
--- a/dimension/directives.rules
+++ b/dimension/directives.rules
@@ -130,8 +130,7 @@ DECL_PARAMS: /* empty */ {
;
DECL_PARAM_LIST: IDENTIFIER {
- $$ = dmnsn_new_astnode(DMNSN_AST_MACRO, @$);
- dmnsn_array_push($$.children, &$1);
+ $$ = dmnsn_new_astnode1(DMNSN_AST_MACRO, @$, $1);
}
| DECL_PARAM_LIST "," IDENTIFIER {
$$ = $1;
@@ -146,12 +145,10 @@ PARAMS: /* empty */ {
;
PARAM_LIST: IDENTIFIER %dprec 2 {
- $$ = dmnsn_new_astnode(DMNSN_AST_MACRO, @$);
- dmnsn_array_push($$.children, &$1);
+ $$ = dmnsn_new_astnode1(DMNSN_AST_MACRO, @$, $1);
}
| PARAM %dprec 1 {
- $$ = dmnsn_new_astnode(DMNSN_AST_MACRO, @$);
- dmnsn_array_push($$.children, &$1);
+ $$ = dmnsn_new_astnode1(DMNSN_AST_MACRO, @$, $1);
}
| PARAM_LIST "," IDENTIFIER %dprec 2 {
$$ = $1;