From 6fdcd6117120fa6ec0499ed40ebf6e83d45f2389 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Wed, 2 Aug 2017 08:07:15 -0700 Subject: [PATCH] Handle empty hash pair in Ruby. e.g. `{() => ()}` --- src/Language/Ruby/Syntax.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index f4ba78437..fe0842382 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -290,6 +290,7 @@ subscript = makeTerm <$> symbol ElementReference <*> children (Expression.Subscr pair :: Assignment pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> expression) + <|> makeTerm <$> symbol Pair <*> (Syntax.Empty <$ source) methodCall :: Assignment methodCall = makeTerm <$> symbol MethodCall <*> children (Expression.Call <$> expression <*> args <*> (block <|> emptyTerm))