1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 04:10:29 +03:00

identifier should be optional in function

This commit is contained in:
joshvera 2017-09-06 09:35:38 +01:00
parent 11e429a812
commit 173de3cad6

View File

@ -904,7 +904,7 @@ constraint :: Assignment
constraint = makeTerm <$> symbol Grammar.Constraint <*> children (Language.TypeScript.Syntax.Constraint <$> ty)
function :: Assignment
function = makeFunction <$> (symbol Grammar.Function <|> symbol Grammar.GeneratorFunction) <*> children ((,,) <$> identifier <*> callSignatureParts <*> statementBlock)
function = makeFunction <$> (symbol Grammar.Function <|> symbol Grammar.GeneratorFunction) <*> children ((,,) <$> (identifier <|> emptyTerm) <*> callSignatureParts <*> statementBlock)
where makeFunction loc (id, (typeParams, params, annotation), statements) = makeTerm loc (Declaration.Function [typeParams, annotation] id params statements)
ambientFunction :: Assignment