1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

Assign FormalParameters in parameters

This commit is contained in:
joshvera 2019-06-25 10:35:44 -04:00
parent 275de222de
commit cc4cc62411

View File

@ -388,7 +388,7 @@ anonymousFunctionCreationExpression = makeTerm <$> symbol AnonymousFunctionCreat
makeFunction identifier parameters functionUseClause returnType statement = Declaration.Function [functionUseClause, returnType] identifier parameters statement
parameters :: Assignment [Term]
parameters = manyTerm (simpleParameter <|> variadicParameter)
parameters = symbol FormalParameters *> children (manyTerm (simpleParameter <|> variadicParameter))
simpleParameter :: Assignment Term
simpleParameter = makeTerm <$> symbol SimpleParameter <*> children (makeAnnotation <$> (term typeDeclaration <|> emptyTerm) <*> (makeAssignment <$> location <*> term variableName <*> (term defaultArgumentSpecifier <|> emptyTerm)))