Make the compile function plain C and take a JSON grammar
This commit is contained in:
parent
b69e19c525
commit
d4632ab9a9
54 changed files with 325 additions and 234 deletions
|
|
@ -188,7 +188,9 @@ class CCodeGenerator {
|
|||
}
|
||||
|
||||
void add_lex_function() {
|
||||
line("static TSTree *ts_lex(TSLexer *lexer, TSStateId state, bool error_mode) {");
|
||||
line(
|
||||
"static TSTree *ts_lex(TSLexer *lexer, TSStateId state, bool error_mode) "
|
||||
"{");
|
||||
indent([&]() {
|
||||
line("START_LEXER();");
|
||||
_switch("state", [&]() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue