Remove generated parsers' dependency on the runtime library

Generated parsers no longer export a parser constructor function.
They now export an opaque Language object which can be set on
Documents directly. This way, the logic for constructing parsers
lives entirely in the runtime. The Languages are just structs which
have no load-time dependency on the runtime
This commit is contained in:
Max Brunsfeld 2014-07-30 23:40:02 -07:00
parent 048a479b5f
commit eecbcccee0
21 changed files with 219 additions and 173 deletions

View file

@ -163,7 +163,7 @@ class CCodeGenerator {
}
void parser_export() {
line("EXPORT_PARSER(ts_parser_" + name + ");");
line("EXPORT_LANGUAGE(ts_language_" + name + ");");
line();
}