1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

No more ArgumentListWithParens

This commit is contained in:
Timothy Clem 2019-12-10 11:08:49 -08:00 committed by Rob Rix
parent ec19540425
commit 409b165a7c
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -315,7 +315,7 @@ pair :: Assignment (Term Loc)
pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> (expression <|> emptyTerm))
args :: Assignment [Term Loc]
args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (many expression) <|> many expression
args = symbol ArgumentList *> children (many expression) <|> many expression
methodCall :: Assignment (Term Loc)
methodCall = makeTerm' <$> symbol MethodCall <*> children (require <|> load <|> send)
@ -335,8 +335,8 @@ methodCall = makeTerm' <$> symbol MethodCall <*> children (require <|> load <|>
load = inject <$ symbol Identifier <*> do
s <- rawSource
guard (s == "load")
(symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (Ruby.Syntax.Load <$> expression <*> optional expression)
nameExpression = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children expression
symbol ArgumentList *> children (Ruby.Syntax.Load <$> expression <*> optional expression)
nameExpression = symbol ArgumentList *> children expression
methodSelector :: Assignment (Term Loc)
methodSelector = makeTerm <$> symbols <*> (Syntax.Identifier <$> (name <$> source))