mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Recover from errors naïvely.
This commit is contained in:
parent
754e7c1e1c
commit
6b5c78160e
@ -117,7 +117,7 @@ instance (Enum symbol, Ord symbol, Show symbol) => Assigning symbol (Assignment
|
||||
NotNullable -> NotNullable)
|
||||
(firstSet a)
|
||||
(map (fmap (\ match src state follow -> case match src state follow of
|
||||
Left err -> Left err
|
||||
Left err -> Right (advanceState state, termIn (stateLocation state) (inject (Syntax.errorSyntax (either id show <$> err) [])))
|
||||
Right (state', syntax) -> Right (state', termIn (stateLocation state) (inject syntax)))) (choices a))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user