MCPcopy Create free account
hub / github.com/brimdata/super / matchTypeParens

Method matchTypeParens

sup/parser-types.go:278–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276}
277
278func (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
297func (p *Parser) matchTypeBody(which string) (ast.Type, error) {
298 l := p.lexer

Callers 1

matchTypeComponentMethod · 0.95

Calls 3

matchTypeMethod · 0.95
errorMethod · 0.95
matchMethod · 0.45

Tested by

no test coverage detected