Refactor c code generator
It's been rewritten in a less functional style. String copies were actually taking significant time for large parsers.
This commit is contained in:
parent
1daaf4485f
commit
c312f985c8
3 changed files with 224 additions and 189 deletions
|
|
@ -10,9 +10,6 @@ namespace tree_sitter {
|
|||
void str_replace(std::string *input, const std::string &search, const std::string &replace);
|
||||
std::string escape_string(std::string input);
|
||||
std::string escape_char(char character);
|
||||
std::string indent(std::string input);
|
||||
std::string join(std::vector<std::string> lines, std::string separator);
|
||||
std::string join(std::vector<std::string> lines);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue