()
| 16 | } |
| 17 | |
| 18 | func (p *Parser) matchType() (ast.Type, error) { |
| 19 | typ, err := p.matchTypeComponent() |
| 20 | if err != nil { |
| 21 | return nil, err |
| 22 | } |
| 23 | if ok, _ := p.lexer.match('|'); ok { |
| 24 | return p.matchTypeUnion(typ) |
| 25 | } |
| 26 | return typ, nil |
| 27 | } |
| 28 | |
| 29 | func (p *Parser) matchTypeComponent() (ast.Type, error) { |
| 30 | if typ, err := p.matchTypeName(); typ != nil || err != nil { |
no test coverage detected