diff --git a/src/Language/TypeScript/Assignment.hs b/src/Language/TypeScript/Assignment.hs index 125cbe59e..0ba1bea22 100644 --- a/src/Language/TypeScript/Assignment.hs +++ b/src/Language/TypeScript/Assignment.hs @@ -174,7 +174,7 @@ type Assignment = Assignment.Assignment [] Grammar Term -- | Assignment from AST in TypeScript’s grammar onto a program in TypeScript’s 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]