diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | parser.l | 6 |
2 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,13 @@ 2015-06-26 Kaz Kylheku <kaz@kylheku.com> + Third round of quasiliteral-related fixes. + + * parser.l (char_esc): Recognize \@ escape. + (grammar): Add a rule for a \@ escape in quasiliterals, + and quasi word list literals. + +2015-06-26 Kaz Kylheku <kaz@kylheku.com> + Second round of quasiliteral-related fixes. * parser.l: Only shift to QSPECIAL state when @ is followed @@ -142,6 +142,7 @@ static wchar_t char_esc(int letter) case '\'': return L'\''; case '`': return L'`'; case '/': return L'/'; + case '@': return L'@'; case '\\': return L'\\'; } @@ -841,6 +842,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return LITCHAR; } +<QSILIT,QWLIT>[\\]@ { + yylval->chr = char_esc(yytext[1]); + return LITCHAR; +} + <STRLIT,QSILIT,WLIT,QWLIT>{WS}[\\]\n{WS} { yyextra->lineno++; } |