Store grammars' rules in vectors, not maps

This way, we can keep of the order in which the rules
were given, for resolving reduce/reduce conflicts.
This commit is contained in:
Max Brunsfeld 2014-03-24 13:05:04 -07:00
parent 671f1a1ddc
commit 48baf056b4
18 changed files with 525 additions and 533 deletions

View file

@ -15,7 +15,7 @@ namespace tree_sitter {
}
Grammar javascript() {
return Grammar("program", {
return Grammar({
{ "program", repeat(sym("statement")) },
{ "terminator", choice({ str(";"), str("\n") }) },
{ "statement", choice({