mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Allow single identifiers in method declaration parameter list
This commit is contained in:
parent
86c7892fe2
commit
b4bdbc7cfb
@ -484,7 +484,8 @@ importSpec = symbol ImportSpec *> children expressions
|
||||
methodDeclaration :: Assignment
|
||||
methodDeclaration = mkTypedMethodDeclaration <$> symbol MethodDeclaration <*> children ((,,,,) <$> receiver <*> fieldIdentifier <*> parameters <*> (typeIdentifier <|> emptyTerm) <*> block)
|
||||
where
|
||||
parameters = symbol Parameters *> children ((symbol ParameterDeclaration *> children (many expression)) <|> many emptyTerm)
|
||||
parameterDeclaration = symbol ParameterDeclaration *> (children (many expression) <|> many emptyTerm)
|
||||
parameters = symbol Parameters *> children (parameterDeclaration <|> many expression)
|
||||
receiver = symbol Parameters *> children (symbol ParameterDeclaration *> children expressions)
|
||||
mkTypedMethodDeclaration loc (receiver', name', parameters', type'', body') = makeTerm loc (Declaration.Method [type''] receiver' name' parameters' body')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user