Tweak format for example grammars
This commit is contained in:
parent
324f55f1ce
commit
13c4e6e648
23 changed files with 1616 additions and 1537 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace tree_sitter {
|
||||
using std::string;
|
||||
|
||||
|
||||
namespace util {
|
||||
void str_replace(string *input, const string &search, const string &replace) {
|
||||
size_t pos = 0;
|
||||
|
|
@ -14,7 +14,7 @@ namespace tree_sitter {
|
|||
pos += replace.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string escape_string(string input) {
|
||||
str_replace(&input, "\"", "\\\"");
|
||||
str_replace(&input, "\n", "\\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue