summaryrefslogtreecommitdiffstats
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
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`.
-rw-r--r--ChangeLog9
-rw-r--r--parser.l2
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c0b9d78..4e18f508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2015-07-07 Kaz Kylheku <kaz@kylheku.com>
+ 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`.
+
+2015-07-07 Kaz Kylheku <kaz@kylheku.com>
+
Improved printing of stream objects.
* stream.c (null_stream_print): Static function removed.
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