refactor: programs as delimited sequences of statements - #164
Conversation
we've lost parsing of string function bodies but that was probably a bad idea to begin with.
matthias-Q
left a comment
There was a problem hiding this comment.
Wow, I am really surprised hat these few change have such a big impact. I am really impressed! Thanks @dmfay
| // https://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment | ||
| marginalia: _ => seq('/*', /[^*]*\*+(?:[^/*][^*]*\*+)*/, '/' ), | ||
|
|
||
| compound_statement: $ => seq( |
There was a problem hiding this comment.
In nvim-treesitter there is a indentens.scm, which refenrences compound_Statement. We should have added a copy of this to our repo as well, so that the tests fail here when we rename nodes.
what statements are you referring to? Can you give me an example? |
there are a couple in the tests, for example
|
DerekStride
left a comment
There was a problem hiding this comment.
Wow this is great, the decrease in number of states is huge 🎉🎉🎉
eliminates the recently added conflicts, shaves a few seconds off compile time, and state count in the parser is cut by over half -- from 7151 states to 3087!
Other changes:
compound_statementhas been renamed toblockcreate_functionusesobject_referencecorrectly