Skip to content
Permalink
Browse files
Lexer now handles '\\' continuation at the end of a line.
  • Loading branch information
icculus committed Feb 15, 2009
1 parent 3fb7c25 commit 378e88dce05799952a294f99df661fc4ef180bee

File 1 of 2 in 378e88d

@@ -69,6 +69,8 @@ scanner_loop:
*/

/*!re2c
"\\" [ \t\v\f]* NEWLINE { s->line++; goto scanner_loop; }
"/*" { goto multilinecomment; }
"//" { goto singlelinecomment; }
@@ -83,7 +85,7 @@ scanner_loop:
(["] (ESC|ANY\[\r\n\\"])* ["])
{ RET(TOKEN_STRING_LITERAL); }
">>=" { RET(TOKEN_RSHIFTASSIGN); }
"<<=" { RET(TOKEN_LSHIFTASSIGN); }
"+=" { RET(TOKEN_ADDASSIGN); }
@@ -129,7 +131,6 @@ scanner_loop:
"}" { RET('}'); }
"=" { RET('='); }
"?" { RET('?'); }
"\\" { RET('\\'); }
PP "include" { RET(TOKEN_PP_INCLUDE); }
PP "line" { RET(TOKEN_PP_LINE); }

0 comments on commit 378e88d

Please sign in to comment.