glcpp: Support #if(expression) with no intervening space.
And add a test case to ensure that this works.
This commit is contained in:
@@ -99,7 +99,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
|
||||
return HASH_IFNDEF;
|
||||
}
|
||||
|
||||
{HASH}if{HSPACE}/.*\n {
|
||||
{HASH}if{HSPACE}*/[^_a-zA-Z0-9].*\n {
|
||||
yyextra->lexing_if = 1;
|
||||
yyextra->space_tokens = 0;
|
||||
return HASH_IF;
|
||||
|
3
src/glsl/glcpp/tests/066-if-nospace-expression.c
Normal file
3
src/glsl/glcpp/tests/066-if-nospace-expression.c
Normal file
@@ -0,0 +1,3 @@
|
||||
#if(1)
|
||||
success
|
||||
#endif
|
@@ -0,0 +1,4 @@
|
||||
|
||||
success
|
||||
|
||||
|
Reference in New Issue
Block a user