Tweak format for example grammars

This commit is contained in:
Max Brunsfeld 2014-03-28 13:51:32 -07:00
parent 324f55f1ce
commit 13c4e6e648
23 changed files with 1616 additions and 1537 deletions

View file

@ -2,8 +2,8 @@
namespace tree_sitter {
namespace rules {
const Symbol ERROR("error", SymbolTypeBuiltIn);
const Symbol START("start", SymbolTypeBuiltIn);
const Symbol END_OF_INPUT("end", SymbolTypeBuiltIn);
Symbol ERROR() { return Symbol("error", SymbolTypeBuiltIn); }
Symbol START() { return Symbol("start", SymbolTypeBuiltIn); }
Symbol END_OF_INPUT() { return Symbol("end", SymbolTypeBuiltIn); }
}
}

View file

@ -5,9 +5,9 @@
namespace tree_sitter {
namespace rules {
extern const Symbol ERROR;
extern const Symbol START;
extern const Symbol END_OF_INPUT;
Symbol ERROR();
Symbol START();
Symbol END_OF_INPUT();
}
}

View file

@ -46,7 +46,7 @@ namespace tree_sitter {
}
rule_ptr err(const rule_ptr &rule) {
return choice({ rule, ERROR.copy() });
return choice({ rule, ERROR().copy() });
}
}
}