Closed ocharles closed 1 year ago
We can't parse conditioned on extensions, but since the dot is already whitespace sensitive, I think it makes sense to default to parsing a projection for the no-whitespace case when the preceding expression is not a conid. A cursory glance at the grammar suggests that this requires quite a bit of rearrangement of rules, so this is an opportunity to clean up a bit 🙂
Fair enough! Note that you probably also want to parse (.foo)
specially, too.
noted!
please take a look, @ocharles : https://github.com/tree-sitter/tree-sitter-haskell/pull/98
Thanks, I'm just rebuild Helix with this now - I'll report back!
Neato!
cool 🙂 let's merge it then
Yep, I think everything is good here
Right now
tree-sitter-haskell
parsesfoo.bar
as if it'sfoo . bar
- that is, the composition offoo
andbar
functions with the infix.
operator. If-XOverloadedRecordDot
is on, this should parse as accessing the fieldbar
of the expressionfoo
.