-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Following discussion in #65
One thing that caught my attention is that we have a test with this snippet(doesn't drop the cursor node):
%{state |
foo: s
__cursor__()
,
bar: Foo.Bar.load(state.foo, state.baz)}
This would incorrectly report an unexpected ) for the Foo.Bar.load call before the fix in #65, but then I noticed that after parsing, it gets recovered to this:
%{state | foo: s}
s(__cursor__())
nil
Foo.Bar.load(state.foo, state.baz)
nil
nil
Essentially we:
- Find the unexpected
__cursor__()and close the map - Extract the following lines from that map
- The
bar:part doesn't make sense outside of a map/kw list, so we drop it
I think dropping bar: there makes sense, but shouldn't the second line be just __cursor__()? The s is already preserved inside the map under the foo key
Metadata
Metadata
Assignees
Labels
No labels