(operator ast.Kind, types *ast.NodeList)
| 2664 | } |
| 2665 | |
| 2666 | func (p *Parser) createUnionOrIntersectionTypeNode(operator ast.Kind, types *ast.NodeList) *ast.Node { |
| 2667 | switch operator { |
| 2668 | case ast.KindBarToken: |
| 2669 | return p.factory.NewUnionTypeNode(types) |
| 2670 | case ast.KindAmpersandToken: |
| 2671 | return p.factory.NewIntersectionTypeNode(types) |
| 2672 | default: |
| 2673 | panic("Unhandled case in createUnionOrIntersectionType") |
| 2674 | } |
| 2675 | } |
| 2676 | |
| 2677 | func (p *Parser) parseTypeOperatorOrHigher() *ast.TypeNode { |
| 2678 | operator := p.token |
no test coverage detected