slackhq / tree-sitter-hack

Hack grammar for tree-sitter
MIT License
33 stars 15 forks source link

Remove custom opt, rep, rep1 methods #33

Closed aosq closed 3 years ago

aosq commented 3 years ago

This PR removes the custom methods opt, rep, rep1 from seq, choice, alias, and com. The dsl function calls that resulted from these methods was confusing even for me (or at the least required some extra mental effort to figure out the order of operations) and obviously this pattern is not used in any other Tree-sitter grammar which would probably make it confusing for anyone new that might want to make a change to tree-sitter-hack.