Rewind and re-tokenize in error mode after detecting an error
This commit is contained in:
parent
76975f56ec
commit
94721c7ec0
4 changed files with 20 additions and 14 deletions
|
|
@ -192,8 +192,7 @@ class CCodeGenerator {
|
|||
|
||||
void add_lex_function() {
|
||||
line(
|
||||
"static void ts_lex(TSLexer *lexer, TSStateId state, bool error_mode) "
|
||||
"{");
|
||||
"static bool 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