1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00

Allow ambiguous parses with and without the error handler.

This commit is contained in:
Rob Rix 2017-08-03 20:00:45 -04:00
parent 232bf01302
commit 24b93e0ad6

View File

@ -283,7 +283,7 @@ runAssignment toNode source = (\ assignment state -> go assignment state >>= req
Many rule -> fix (\ recur list state -> yield list state <> (go rule state >>= \ (a, state') -> if stateCounter state == stateCounter state' then yield (list <> [a]) state' else recur (list <> [a]) state')) [] state
Alt as -> Some as >>= flip yield state
Throw e -> None e
Catch during handler -> go during state `catchError` (flip go state . handler) >>= uncurry yield
Catch during handler -> (go during state >>= uncurry yield) <> (go during state `catchError` (flip go state . handler) >>= uncurry yield)
Choose{} -> None (makeError node)
Project{} -> None (makeError node)
Children{} -> None (makeError node)