Refactor parser header
Make separate lexer, stack and parser structs.
This commit is contained in:
parent
05a5f9c124
commit
0dc3a95d0c
11 changed files with 361 additions and 276 deletions
|
|
@ -253,11 +253,9 @@ namespace tree_sitter {
|
|||
}
|
||||
cases += _default(recover_case(0, set<rules::Symbol>()));
|
||||
|
||||
string body = _switch("state", cases);
|
||||
return join({
|
||||
"static const ts_symbol * "
|
||||
"ts_recover(ts_state state, ts_state *to_state, size_t *count) {",
|
||||
indent(body),
|
||||
"RECOVER_FN() {",
|
||||
indent(_switch("state", cases)),
|
||||
"}"
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue