Fix #if-skipping to *really* skip the skipped group.

Previously we were avoiding printing within a skipped group, but we
were still evluating directives such as #define and #undef and still
emitting diagnostics for things such as macro calls with the wrong
number of arguments.

Add a test for this and fix it with a high-priority rule in the lexer
that consumes the skipped content.
This commit is contained in:
Carl Worth
2010-06-01 11:20:18 -07:00
parent 96d3994881
commit a771a40e22
4 changed files with 50 additions and 31 deletions
+1
View File
@@ -127,6 +127,7 @@ struct glcpp_parser {
yyscan_t scanner;
struct hash_table *defines;
string_list_t *active;
int lexing_if;
int space_tokens;
int newline_as_space;
int in_control_line;