Closed byCedric closed 3 years ago
This refactor seems good to me. It doesn't change the grammar at all, just moves repeated logic from
token()
andsummary()
intoscope()
?
Yep, it doesn't change anything in the output. We just contain our parsing logic within a single parsing method 😄 I think this is the method @wesleytodd mentioned too in Slack
Note, this is just a try-out. Feel free to close this if it's too much.
One thing I'm not a fan of is having certain tokens spread out to parse a node. The
scope
is the biggest one that's currently a bit spread. E.g.token
parsingHaving it contained within the parsing method might help cleaning this up.