mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Drop anonymous nodes before catches whose bodies would drop anonymous nodes.
This prevents handlers capturing tokens that would otherwise have been skipped altogether.
This commit is contained in:
parent
de18f9c860
commit
1635baf667
@ -197,6 +197,7 @@ nodeError expected (Node actual _ span) = Error span expected (Just (Right actua
|
|||||||
firstSet :: Assignment ast grammar a -> [grammar]
|
firstSet :: Assignment ast grammar a -> [grammar]
|
||||||
firstSet = iterFreer (\ assignment _ -> case assignment of
|
firstSet = iterFreer (\ assignment _ -> case assignment of
|
||||||
Choose symbols _ -> symbols
|
Choose symbols _ -> symbols
|
||||||
|
Catch during _ -> firstSet during
|
||||||
_ -> []) . ([] <$)
|
_ -> []) . ([] <$)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user