mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-08 09:40:29 +01:00
glcpp: Support #if(expression) with no intervening space.
And add a test case to ensure that this works.
This commit is contained in:
parent
61ebc01dfe
commit
17f9beb6c3
3 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue