Make the compile function plain C and take a JSON grammar

This commit is contained in:
Max Brunsfeld 2016-01-10 20:04:41 -08:00
parent b69e19c525
commit d4632ab9a9
54 changed files with 325 additions and 234 deletions

View file

@ -94,17 +94,17 @@ struct TSLanguage {
* Lexer Macros
*/
#define START_LEXER() \
lexer->start_fn(lexer, state); \
int32_t lookahead; \
next_state: \
#define START_LEXER() \
lexer->start_fn(lexer, state); \
int32_t lookahead; \
next_state: \
lookahead = lexer->lookahead;
#define START_TOKEN() lexer->start_token_fn(lexer);
#define GO_TO_STATE(state_value) \
{ \
state = state_value; \
state = state_value; \
goto next_state; \
}