glcpp: Actually support #ifdef and #ifndef.

Strangely, the lexer never created these tokens, even though the parser
already had code to handle them.
This commit is contained in:
Kenneth Graunke
2010-06-17 14:36:34 -07:00
parent e0e429fca3
commit 77260fc0a0
+10
View File
@@ -70,6 +70,16 @@ NON_STARS_THEN_STARS [^*]*[*]+
return OTHER;
}
{HASH}ifdef/.*\n {
yyextra->space_tokens = 0;
return HASH_IFDEF;
}
{HASH}ifndef/.*\n {
yyextra->space_tokens = 0;
return HASH_IFNDEF;
}
{HASH}if/.*\n {
yyextra->lexing_if = 1;
yyextra->space_tokens = 0;