summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp-lex.l
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-11-26 11:53:45 -0800
committerMatt Turner <[email protected]>2012-11-28 10:27:02 -0800
commitc3a465ae98be6db1aee582f15380944b8faaeafc (patch)
tree041576120971e4a187c66452138daba1cee986c3 /src/glsl/glcpp/glcpp-lex.l
parentaed466192a78ff2bb3db877a9599424de708cf90 (diff)
glcpp: Support #elif(expression) with no intervening space.
And add test cases to ensure that this works - 110 verifies that glcpp rejects #elif<digits> which glcpp previously accepted. - 111 verifies that glcpp accepts #if followed immediately by (, +, -, !, or ~. - 112 does the same as 111 but for #elif. See 17f9beb6 for #if change. Reviewed-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/glcpp-lex.l')
-rw-r--r--src/glsl/glcpp/glcpp-lex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index 4f0dd34d30d..fd28711d12c 100644
--- a/src/glsl/glcpp/glcpp-lex.l
+++ b/src/glsl/glcpp/glcpp-lex.l
@@ -158,7 +158,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return HASH_IF;
}
-{HASH}elif {
+{HASH}elif/[^_a-zA-Z0-9] {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;
return HASH_ELIF;