diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-05-19 08:43:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-05-19 08:43:11 -0700 |
commit | 198fefbc1e74f2c9a046c40d69172876a3e10d46 (patch) | |
tree | 8ce6479696a89f5c4af0487231a33db4dce4da0a | |
parent | 3210e6fbf9168d7cf47bb63b17ae934ff3909689 (diff) | |
download | txr-198fefbc1e74f2c9a046c40d69172876a3e10d46.tar.gz txr-198fefbc1e74f2c9a046c40d69172876a3e10d46.tar.bz2 txr-198fefbc1e74f2c9a046c40d69172876a3e10d46.zip |
parser: compounds not attributed with format string.
* parser.y (quasi_item): In the @ n_expr case, we
must generate the sys:var expression if the @ is
carrying a format string, regardless of whether n_expr
is an integer or symbol.
* y.tab.c.shipped: Regenerated.
-rw-r--r-- | parser.y | 2 | ||||
-rw-r--r-- | y.tab.c.shipped | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1421,7 +1421,7 @@ quasi_item : litchars { $$ = $1; } | q_var { $$ = $1; } | METANUM { $$ = cons(var_s, cons($1, nil)); rl($$, num(parser->lineno)); } - | '@' n_expr { if (integerp($2) || symbolp($2)) + | '@' n_expr { if (integerp($2) || symbolp($2) || $1) { $$ = rlcp_tree(if3($1, list(var_s, $2, nil, $1, nao), diff --git a/y.tab.c.shipped b/y.tab.c.shipped index 1a31c20f..f3433f68 100644 --- a/y.tab.c.shipped +++ b/y.tab.c.shipped @@ -6676,7 +6676,7 @@ yyreduce: /* Line 1806 of yacc.c */ #line 1424 "parser.y" - { if (integerp((yyvsp[(2) - (2)].val)) || symbolp((yyvsp[(2) - (2)].val))) + { if (integerp((yyvsp[(2) - (2)].val)) || symbolp((yyvsp[(2) - (2)].val)) || (yyvsp[(1) - (2)].val)) { (yyval.val) = rlcp_tree(if3((yyvsp[(1) - (2)].val), list(var_s, (yyvsp[(2) - (2)].val), nil, (yyvsp[(1) - (2)].val), nao), |