1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Can have binary statement of empty expressions

This commit is contained in:
Timothy Clem 2017-08-01 15:25:28 -07:00
parent da51cb3c20
commit 473e7e34dd

View File

@ -351,7 +351,7 @@ unary = symbol Unary >>= \ location ->
<|> makeTerm location . Expression.Negate <$> children expression -- Unary minus (e.g. `-a`). HiddenUnaryMinus nodes are hidden, so we can't match on the symbol.
binary :: Assignment
binary = symbol Binary >>= \ loc -> children $ expression >>= \ lexpression -> go loc lexpression
binary = symbol Binary >>= \ loc -> children $ (expression <|> emptyTerm) >>= \ lexpression -> go loc lexpression
where
go loc lexpression
= mk AnonAnd Expression.And