(flags ParseFlags, diagnosticMessage *diagnostics.Message)
| 3499 | } |
| 3500 | |
| 3501 | func (p *Parser) parseFunctionBlock(flags ParseFlags, diagnosticMessage *diagnostics.Message) *ast.Node { |
| 3502 | saveContextFlags := p.contextFlags |
| 3503 | saveHasAwaitIdentifier := p.statementHasAwaitIdentifier |
| 3504 | p.setContextFlags(ast.NodeFlagsYieldContext, flags&ParseFlagsYield != 0) |
| 3505 | p.setContextFlags(ast.NodeFlagsAwaitContext, flags&ParseFlagsAwait != 0) |
| 3506 | // We may be in a [Decorator] context when parsing a function expression or |
| 3507 | // arrow function. The body of the function is not in [Decorator] context. |
| 3508 | p.setContextFlags(ast.NodeFlagsDecoratorContext, false) |
| 3509 | block := p.parseBlock(flags&ParseFlagsIgnoreMissingOpenBrace != 0, diagnosticMessage) |
| 3510 | p.contextFlags = saveContextFlags |
| 3511 | p.statementHasAwaitIdentifier = saveHasAwaitIdentifier |
| 3512 | return block |
| 3513 | } |
| 3514 | |
| 3515 | func (p *Parser) isIndexSignature() bool { |
| 3516 | return p.token == ast.KindOpenBracketToken && p.lookAhead((*Parser).nextIsUnambiguouslyIndexSignature) |
no test coverage detected