1
1
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:
Rob Rix 2018-07-03 09:54:42 -04:00
parent 754e7c1e1c
commit 6b5c78160e

View File

@ -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))