Lexer now handles '\\' continuation at the end of a line.
--- a/mojoshader_lexer.re Sun Feb 15 02:49:40 2009 -0500
+++ b/mojoshader_lexer.re Sun Feb 15 02:51:39 2009 -0500
@@ -69,6 +69,8 @@
*/
/*!re2c
+ "\\" [ \t\v\f]* NEWLINE { s->line++; goto scanner_loop; }
+
"/*" { goto multilinecomment; }
"//" { goto singlelinecomment; }
@@ -83,7 +85,7 @@
(["] (ESC|ANY\[\r\n\\"])* ["])
{ RET(TOKEN_STRING_LITERAL); }
-
+
">>=" { RET(TOKEN_RSHIFTASSIGN); }
"<<=" { RET(TOKEN_LSHIFTASSIGN); }
"+=" { RET(TOKEN_ADDASSIGN); }
@@ -129,7 +131,6 @@
"}" { RET('}'); }
"=" { RET('='); }
"?" { RET('?'); }
- "\\" { RET('\\'); }
PP "include" { RET(TOKEN_PP_INCLUDE); }
PP "line" { RET(TOKEN_PP_LINE); }
--- a/mojoshader_preprocessor.c Sun Feb 15 02:49:40 2009 -0500
+++ b/mojoshader_preprocessor.c Sun Feb 15 02:51:39 2009 -0500
@@ -568,10 +568,6 @@
} // preprocessor_outofmemory
-// !!! FIXME: (almost?) all preprocessor directives can end a line with a
-// !!! FIXME: '\\' to continue to the next line.
-
-
static int require_newline(IncludeState *state)
{
const char *source = state->source;