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:
parent
d424713d42
commit
67e27e966f
@ -83,7 +83,7 @@ type Assignment = HasCallStack => Assignment.Assignment [] Grammar Term
|
||||
|
||||
-- | Assignment from AST in Ruby’s grammar onto a program in Ruby’s 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))
|
||||
|
Loading…
Reference in New Issue
Block a user