Refactor parser header

Make separate lexer, stack and parser structs.
This commit is contained in:
Max Brunsfeld 2014-03-13 00:43:23 -07:00
parent 05a5f9c124
commit 0dc3a95d0c
11 changed files with 361 additions and 276 deletions

View file

@ -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)),
"}"
});
}