static source_position_t expansion_pos;
static pp_definition_t *current_expansion = NULL;
static strset_t stringset;
-static preprocessor_token_kind_t last_token;
+static token_kind_t last_token;
static searchpath_entry_t *searchpath;
return (string_t){ result, len, enc };
}
-static void parse_string(utf32 const delimiter, preprocessor_token_kind_t const kind, string_encoding_t const enc, char const *const context)
+static void parse_string(utf32 const delimiter, token_kind_t const kind,
+ string_encoding_t const enc,
+ char const *const context)
{
const unsigned start_linenr = input.position.lineno;
}
}
-static void eat_pp(preprocessor_token_kind_t const type)
+static inline void eat_pp(token_kind_t const kind)
{
- (void) type;
- assert(pp_token.kind == type);
+ assert(pp_token.kind == kind);
+ (void) kind;
next_preprocessing_token();
}
case '~':
case ';':
case ',':
- case '\\':
pp_token.kind = input.c;
next_char();
return;
eat_pp_directive();
}
+/** behind an #include we can have the special headername lexems.
+ * They're only allowed behind an #include so they're not recognized
+ * by the normal next_preprocessing_token. We handle them as a special
+ * exception here */
static void parse_headername(void)
{
const source_position_t start_position = input.position;
string_t string = { NULL, 0, STRING_ENCODING_CHAR };
assert(obstack_object_size(&symbol_obstack) == 0);
- /* behind an #include we can have the special headername lexems.
- * They're only allowed behind an #include so they're not recognized
- * by the normal next_preprocessing_token. We handle them as a special
- * exception here */
if (info.at_line_begin) {
parse_error("expected headername after #include");
goto finish_error;
if (conditional->in_else) {
errorf(&pp_token.base.source_position,
"#else after #else (condition started %P)",
- conditional->source_position);
+ &conditional->source_position);
skip_mode = true;
return;
}