1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Handle empty hash pair in Ruby. e.g. {() => ()}

This commit is contained in:
Timothy Clem 2017-08-02 08:07:15 -07:00
parent 79d1156ff7
commit 6fdcd61171

View File

@ -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))