1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Handle errors in typescript assignment

This commit is contained in:
joshvera 2017-10-18 10:43:24 -04:00
parent d424713d42
commit 67e27e966f

View File

@ -83,7 +83,7 @@ type Assignment = HasCallStack => Assignment.Assignment [] Grammar Term
-- | Assignment from AST in Rubys grammar onto a program in Rubys syntax.
assignment :: Assignment
assignment = makeTerm <$> symbol Program <*> children (Syntax.Program <$> many expression) <|> parseError
assignment = handleError $ makeTerm <$> symbol Program <*> children (Syntax.Program <$> many expression) <|> parseError
expression :: Assignment
expression = term (handleError (choice expressionChoices))