If true, we should abort parsing an error function.
(node *ast.TypeNode)
| 4454 | |
| 4455 | // If true, we should abort parsing an error function. |
| 4456 | func typeHasArrowFunctionBlockingParseError(node *ast.TypeNode) bool { |
| 4457 | switch node.Kind { |
| 4458 | case ast.KindTypeReference: |
| 4459 | return ast.NodeIsMissing(node.AsTypeReferenceNode().TypeName) |
| 4460 | case ast.KindFunctionType, ast.KindConstructorType: |
| 4461 | return isMissingNodeList(node.FunctionLikeData().Parameters) || typeHasArrowFunctionBlockingParseError(node.Type()) |
| 4462 | case ast.KindParenthesizedType: |
| 4463 | return typeHasArrowFunctionBlockingParseError(node.Type()) |
| 4464 | } |
| 4465 | return false |
| 4466 | } |
| 4467 | |
| 4468 | func (p *Parser) parseArrowFunctionExpressionBody(isAsync bool, allowReturnTypeInArrowFunction bool) *ast.Node { |
| 4469 | if p.token == ast.KindOpenBraceToken { |
no test coverage detected