mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Can have binary statement of empty expressions
This commit is contained in:
parent
da51cb3c20
commit
473e7e34dd
@ -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.
|
<|> 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 :: Assignment
|
||||||
binary = symbol Binary >>= \ loc -> children $ expression >>= \ lexpression -> go loc lexpression
|
binary = symbol Binary >>= \ loc -> children $ (expression <|> emptyTerm) >>= \ lexpression -> go loc lexpression
|
||||||
where
|
where
|
||||||
go loc lexpression
|
go loc lexpression
|
||||||
= mk AnonAnd Expression.And
|
= mk AnonAnd Expression.And
|
||||||
|
Loading…
Reference in New Issue
Block a user