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:
parent
671f1a1ddc
commit
48baf056b4
18 changed files with 525 additions and 533 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue