Fix parsing of wildcard patterns at the ends of documents

- Remove special EOF handling from lexer
- Explicitly exclude the EOF character from all-inclusive character sets.
This commit is contained in:
Max Brunsfeld 2014-09-11 13:10:23 -07:00
parent a2b80098b2
commit 68d6e242ee
8 changed files with 98 additions and 39 deletions

View file

@ -96,10 +96,7 @@ struct TSLanguage {
#define ADVANCE(state_index) \
{ \
DEBUG_LEX("ADVANCE %d", state_index); \
if (!ts_lexer_advance(lexer)) { \
DEBUG_LEX("END"); \
return ts_lexer_accept(lexer, ts_builtin_sym_end, 0); \
} \
ts_lexer_advance(lexer); \
lex_state = state_index; \
goto next_state; \
}