()
| 3739 | } |
| 3740 | |
| 3741 | func (p *Parser) parseTemplateMiddleOrTail() *ast.Node { |
| 3742 | pos := p.nodePos() |
| 3743 | var result *ast.Node |
| 3744 | if p.token == ast.KindTemplateMiddle { |
| 3745 | result = p.factory.NewTemplateMiddle(p.scanner.TokenValue(), p.getTemplateLiteralRawText(2 /*endLength*/), p.scanner.TokenFlags()) |
| 3746 | } else { |
| 3747 | result = p.factory.NewTemplateTail(p.scanner.TokenValue(), p.getTemplateLiteralRawText(1 /*endLength*/), p.scanner.TokenFlags()) |
| 3748 | } |
| 3749 | p.nextToken() |
| 3750 | return p.finishNode(result, pos) |
| 3751 | } |
| 3752 | |
| 3753 | func (p *Parser) parseFunctionOrConstructorTypeToError(isInUnionType bool, parseConstituentType func(p *Parser) *ast.TypeNode) *ast.TypeNode { |
| 3754 | // the function type and constructor type shorthand notation |
no test coverage detected