mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
identifier should be optional in function
This commit is contained in:
parent
11e429a812
commit
173de3cad6
@ -904,7 +904,7 @@ constraint :: Assignment
|
|||||||
constraint = makeTerm <$> symbol Grammar.Constraint <*> children (Language.TypeScript.Syntax.Constraint <$> ty)
|
constraint = makeTerm <$> symbol Grammar.Constraint <*> children (Language.TypeScript.Syntax.Constraint <$> ty)
|
||||||
|
|
||||||
function :: Assignment
|
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)
|
where makeFunction loc (id, (typeParams, params, annotation), statements) = makeTerm loc (Declaration.Function [typeParams, annotation] id params statements)
|
||||||
|
|
||||||
ambientFunction :: Assignment
|
ambientFunction :: Assignment
|
||||||
|
Loading…
Reference in New Issue
Block a user