projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0e429f
)
glcpp: Actually support #ifdef and #ifndef.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 17 Jun 2010 21:36:34 +0000
(14:36 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Mon, 21 Jun 2010 18:31:55 +0000
(11:31 -0700)
Strangely, the lexer never created these tokens, even though the parser
already had code to handle them.
glcpp/glcpp-lex.l
patch
|
blob
|
history
diff --git
a/glcpp/glcpp-lex.l
b/glcpp/glcpp-lex.l
index 06bde3f1957e003ca6c995dc63fdcc8d351db095..a04e0fabdf8772b359376381acb491f3586da1f7 100644
(file)
--- a/
glcpp/glcpp-lex.l
+++ b/
glcpp/glcpp-lex.l
@@
-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;