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:
parent
3c474f1cfd
commit
965d12dc98
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user