summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-04-07 13:43:52 -0700
committerIan Romanick <[email protected]>2010-04-07 16:49:25 -0700
commit62f62ca3b3a206bb52de79b8fc7890ac8c62c7fc (patch)
tree1810776e71dc04f0d61a68dec5555b0a9b3a8e07
parent77cce649c9063e279db60b8dfba8835da59cdf19 (diff)
Partially fix comment handling in preprocessor directives.
Multi-line /* */ comments are still broken. I think this will wait to be fixed until we have a real preprocessor.
-rw-r--r--glsl_lexer.lpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/glsl_lexer.lpp b/glsl_lexer.lpp
index 8f3f1211d5d..672ff39dc61 100644
--- a/glsl_lexer.lpp
+++ b/glsl_lexer.lpp
@@ -61,6 +61,7 @@
^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; }
^[ \t]*#[ \t]*line { BEGIN PP; return LINE; }
^[ \t]*#[ \t]*pragma { BEGIN PP; return PRAGMA; }
+<PP>\/\/[^\n]* { }
<PP>: return COLON;
<PP>[_a-zA-Z][_a-zA-Z0-9]* {
yylval->identifier = strdup(yytext);