1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Catch exceptions back to assignment errors

This commit is contained in:
joshvera 2017-11-06 15:53:05 -05:00
parent 3c474f1cfd
commit 965d12dc98

View File

@ -174,7 +174,7 @@ type Assignment = Assignment.Assignment [] Grammar Term
-- | Assignment from AST in TypeScripts grammar onto a program in TypeScripts syntax.
assignment :: Assignment
assignment = makeTerm <$> symbol Program <*> children (Syntax.Program <$> manyTerm statement) <|> parseError
assignment = handleError $ makeTerm <$> symbol Program <*> children (Syntax.Program <$> manyTerm statement) <|> parseError
-- | Match a term optionally preceded by comment(s), or a sequence of comments if the term is not present.
manyTerm :: Assignment -> Assignment.Assignment [] Grammar [Term]