mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Add empty context to Ruby method and singletonMethod
This commit is contained in:
parent
3b6fe74bfa
commit
ce66af3cf6
@ -207,11 +207,11 @@ parameter =
|
||||
where mk s = makeTerm <$> symbol s <*> (Syntax.Identifier <$> source)
|
||||
|
||||
method :: Assignment
|
||||
method = makeTerm <$> symbol Method <*> children (Declaration.Method <$> emptyTerm <*> expression <*> params <*> expressions)
|
||||
method = makeTerm <$> symbol Method <*> children (Declaration.Method <$> [] <*> emptyTerm <*> expression <*> params <*> expressions)
|
||||
where params = symbol MethodParameters *> children (many parameter) <|> pure []
|
||||
|
||||
singletonMethod :: Assignment
|
||||
singletonMethod = makeTerm <$> symbol SingletonMethod <*> children (Declaration.Method <$> expression <*> expression <*> params <*> expressions)
|
||||
singletonMethod = makeTerm <$> symbol SingletonMethod <*> children (Declaration.Method <$> [] <*> expression <*> expression <*> params <*> expressions)
|
||||
where params = symbol MethodParameters *> children (many parameter) <|> pure []
|
||||
|
||||
lambda :: Assignment
|
||||
|
Loading…
Reference in New Issue
Block a user