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

Don’t match errors specially in JS term assignment.

This commit is contained in:
Rob Rix 2017-01-20 14:11:05 -05:00
parent e11c56b7a4
commit c16e75c670

View File

@ -19,7 +19,6 @@ termAssignment
-> IO [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ All child nodes (included unnamed productions) of the term as 'IO'. Only use this if you need it.
-> IO (Maybe (S.Syntax Text (SyntaxTerm Text '[Range, Category, SourceSpan]))) -- ^ The resulting term, in IO.
termAssignment source (_ :. category :. _ :. Nil) children allChildren
| category == Error = pure (Just (S.Error children))
| category `elem` operators = do
allChildren' <- allChildren
pure $! Just (S.Operator allChildren')