summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-07-30 07:29:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-07-30 07:29:44 -0700
commitff4d78c938128cd0572f6469425005d9019a7f38 (patch)
tree877b69ca541b02dd8dccd4de14f04dd7ef21db7a /parser.l
parent550c1292e61f52cd1bdcf135520706bbfd6a3464 (diff)
downloadtxr-ff4d78c938128cd0572f6469425005d9019a7f38.tar.gz
txr-ff4d78c938128cd0572f6469425005d9019a7f38.tar.bz2
txr-ff4d78c938128cd0572f6469425005d9019a7f38.zip
* parser.l: Allow unquotes and splices in QSPECIAL and BRACED states.
* parser.y (quasi_item): Support splices as items. * genvim.txr: Syntax highlighting support for unquotes in quasiliterals. * txr.vim: Updated.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l7
1 files changed, 6 insertions, 1 deletions
diff --git a/parser.l b/parser.l
index be3365e2..4edb90ee 100644
--- a/parser.l
+++ b/parser.l
@@ -547,7 +547,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return yytext[0];
}
-<NESTED>,[*] {
+<NESTED,QSPECIAL,BRACED>,[*] {
yylval.chr = '*';
return SPLICE;
}
@@ -557,6 +557,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return yytext[0];
}
+<QSPECIAL,BRACED>[,'] {
+ yylval.chr = yytext[0];
+ return yytext[0];
+}
+
<BRACED>[}] {
yy_pop_state();
if (yy_top_state() == INITIAL