diff options
author | Carl Worth <[email protected]> | 2014-07-01 17:47:29 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-08-07 16:08:29 -0700 |
commit | b4b2a5c3f31f0f66d3ddf1e994c099304d99ed4b (patch) | |
tree | 75fb1bb3b3a4f10e36826c95b546cde56377dfb7 /src/glsl | |
parent | b76482e7312827ab13f37ab9a7e3c8eef30bfe7a (diff) |
glsl/glcpp: Allow single-line comments immediately after #define
We were already correctly supporting single-line comments in case like:
#define FOO bar // comment here...
The new support added here is simply for the none-too-useful:
#define // comment instead of macro name
With this commit, this line will now give the expected "#define without
macro name" error message instead of the lexer just going off into the
weeds.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glcpp/glcpp-lex.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 6e197d12a1a..2cfe203dacf 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -250,7 +250,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? } /* Single-line comments */ -"//"[^\r\n]* { +<INITIAL,DEFINE>"//"[^\r\n]* { } /* Multi-line comments */ |