summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-18 06:46:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-18 06:46:40 -0700
commit7cebd162dcd582b1ff031c43f7f57d76087e8b8b (patch)
treecbef2e612277d056d77c37bbd4f60b9a348bf910 /parser.y
parentb7328a9a4f54d27f57bde487a02a7348e4685048 (diff)
downloadtxr-7cebd162dcd582b1ff031c43f7f57d76087e8b8b.tar.gz
txr-7cebd162dcd582b1ff031c43f7f57d76087e8b8b.tar.bz2
txr-7cebd162dcd582b1ff031c43f7f57d76087e8b8b.zip
Bugfix: @(if expr) not macro-expanding expr.
* parser.y (if_clause, elif_clauses_opt): Add missing expand calls.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.y b/parser.y
index af2efad9..dbaff205 100644
--- a/parser.y
+++ b/parser.y
@@ -366,7 +366,7 @@ if_clause : IF exprs_opt ')'
val cases = nappend2(nappend2(iff, elifs), els);
$$ = list(cases_s, cases, nao); }
else
- { val expr = car($2);
+ { val expr = expand(car($2), nil);
val ifs = $5;
val branch = cons(cons(expr, ifs), nil);
val elifs = $6;
@@ -386,7 +386,7 @@ elif_clauses_opt : ELIF exprs_opt ')' newl
{ val req = rlcp(cons(require_s, $2), $2);
$$ = cons(cons(cons(req, nil), $5), $6); }
else
- { val expr = car($2);
+ { val expr = expand(car($2), nil);
val elifs = $5;
val branch = cons(cons(expr, elifs), nil);
if (cdr($2))