mojoshader_lexer.re
changeset 635 be3b428802a1
parent 631 5045dcc9fdaf
child 642 624ab8696f9b
--- a/mojoshader_lexer.re	Mon Feb 16 20:29:28 2009 -0500
+++ b/mojoshader_lexer.re	Mon Feb 16 20:30:05 2009 -0500
@@ -144,7 +144,7 @@
     PP "endif"      { RET(TOKEN_PP_ENDIF); }
     PP "error"      { RET(TOKEN_PP_ERROR); }
 
-    WHITESPACE      { goto scanner_loop; }
+    WHITESPACE      { if (s->report_whitespace) RET(' '); goto scanner_loop; }
     NEWLINE         { s->line++; RET('\n'); }
     ANY             { goto bad_chars; }
 */
@@ -158,6 +158,8 @@
     "*\/"           {
                         if (saw_newline)
                             RET('\n');
+                        else if (s->report_whitespace)
+                            RET(' ');
                         goto scanner_loop;
                     }
     NEWLINE         {