()
| 276 | } |
| 277 | |
| 278 | func (p *Parser) matchTypeParens() (ast.Type, error) { |
| 279 | l := p.lexer |
| 280 | if ok, err := l.match('('); !ok || err != nil { |
| 281 | return nil, err |
| 282 | } |
| 283 | typ, err := p.matchType() |
| 284 | if err != nil { |
| 285 | return nil, err |
| 286 | } |
| 287 | ok, err := l.match(')') |
| 288 | if err != nil { |
| 289 | return nil, err |
| 290 | } |
| 291 | if !ok { |
| 292 | return nil, p.error("mismatched parentheses while parsing parenthesized type") |
| 293 | } |
| 294 | return typ, nil |
| 295 | } |
| 296 | |
| 297 | func (p *Parser) matchTypeBody(which string) (ast.Type, error) { |
| 298 | l := p.lexer |
no test coverage detected