Closed breck7 closed 1 year ago
Perhaps something like this:
The huge pro is if it makes it easier for newcomers (and devs who haven't touched a lang in a while) to read the language source, with relatively little work. It would likely just be a few lines of code append (add a comment/section nodeType and blank line nodetype). In formatting, we could have a rule that you replace any 2+ blank lines with 1 blank line. We would lose the ability to auto sort the nodes, unless we introduced the concept of "sections" and autosorted those perhaps.
could have blank lines be "section break". Then the default prettier behavior could be to format each section.
~2 yrs later this is live in Grammar 4 (finally)
Didn't solve the sorting but can do that later.
Grammar is turning out to be a key language. Perhaps making it easier to add a little documentation might be helpful.