From 473e7e34dd25b57a21749f514a1b88dc37966049 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 1 Aug 2017 15:25:28 -0700 Subject: [PATCH] Can have binary statement of empty expressions --- src/Language/Ruby/Syntax.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index 07ab96a3a..dd7024559 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -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