if (file->current == sizeof(file->lastok)-1)
file->lastok[file->current] = (char)'\0';
}
-static inline void lex_clear(lex_file *file) {
+static GMQCC_INLINE void lex_clear(lex_file *file) {
file->current = 0;
}
default:
lex_unget('?', file);
lex_unget(ch , file);
- return '?';
}
return '?';
}
#undef TEST_TYPE
return LEX_IDENT;
}
- return ch;
+ return (ch != ' ') ? ch : lex_token(file);
}
void lex_reset(lex_file *file) {
* recrusion.
*/
lex_file *lex_include(lex_file *lex, const char *file) {
+ lex_file *set = NULL;
+
util_strrq(file);
if (strncmp(lex->name, file, strlen(lex->name)) == 0) {
error(lex, ERROR_LEX, "Source file cannot include itself\n");
exit (-1);
}
-
- lex_file *set = NULL;
lex_init(file, &set);
return set;