summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-06-07 07:19:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-06-07 07:19:18 -0700
commite1aa0323be7eba355780d76455dde25ed51d481f (patch)
treeda4074aa28a257e82805cfa0d8b82e010b5c0b9a /parser.l
parent2f792610c11dd2a82a5e9b35be55a227665e76d1 (diff)
downloadtxr-e1aa0323be7eba355780d76455dde25ed51d481f.tar.gz
txr-e1aa0323be7eba355780d76455dde25ed51d481f.tar.bz2
txr-e1aa0323be7eba355780d76455dde25ed51d481f.zip
Bugfix: allow @1 in brace variables.
* parser.l (grammar): Scan a METANUM token in the BRACED state also. This allows us to correctly reference op arguments in a quasiliteral, as in `foo @{@1 [1..2] ","} bar`.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.l b/parser.l
index 30cb3034..f7c717e8 100644
--- a/parser.l
+++ b/parser.l
@@ -310,7 +310,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return NUMBER;
}
-<NESTED,QSILIT,QWLIT,QSPECIAL>@{NUM} {
+<NESTED,BRACED,QSILIT,QWLIT,QSPECIAL>@{NUM} {
val str = string_own(utf8_dup_from(yytext + 1));
if (yy_top_state(yyscanner) == INITIAL