From 31dc6121a74964c3b097c39fe4beea57629b0336 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 1 Aug 2017 11:40:28 -0700 Subject: [PATCH] Allow ArgumentListWithParens in call --- src/Language/Ruby/Syntax.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index f333f3fa0..661451676 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -288,8 +288,11 @@ methodCall = makeTerm <$> symbol MethodCall <*> children (Expression.Call <$> ex where args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (many expression) <|> pure [] + call :: Assignment -call = makeTerm <$> symbol Call <*> children (Expression.MemberAccess <$> expression <*> expression) +call = makeTerm <$> symbol Call <*> children (Expression.MemberAccess <$> expression <*> (expression <|> args)) + where + args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (expressions) rescue :: Assignment rescue = rescue'