Remove state argument to Lexer advance method

This commit is contained in:
Max Brunsfeld 2016-12-05 16:36:34 -08:00
parent c16b6b2059
commit c4fe8ded95
4 changed files with 15 additions and 15 deletions

View file

@ -23,7 +23,7 @@ typedef struct {
} TSSymbolMetadata;
typedef struct {
void (*advance)(void *, TSStateId, bool);
void (*advance)(void *, bool);
int32_t lookahead;
TSSymbol result_symbol;
} TSLexer;
@ -92,14 +92,14 @@ typedef struct TSLanguage {
#define ADVANCE(state_value) \
{ \
lexer->advance(lexer, state_value, false); \
lexer->advance(lexer, false); \
state = state_value; \
goto next_state; \
}
#define SKIP(state_value) \
{ \
lexer->advance(lexer, state_value, true); \
lexer->advance(lexer, true); \
state = state_value; \
goto next_state; \
}