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

Method matchTypeBody

sup/parser-types.go:297–318  ·  view source on GitHub ↗
(which string)

Source from the content-addressed store, hash-verified

295}
296
297func (p *Parser) matchTypeBody(which string) (ast.Type, error) {
298 l := p.lexer
299 ok, err := l.match('(')
300 if !ok {
301 return nil, p.errorf("no opening parenthesis in %s type", which)
302 }
303 if err != nil {
304 return nil, err
305 }
306 typ, err := p.matchType()
307 if err != nil {
308 return nil, err
309 }
310 ok, err = l.match(')')
311 if err != nil {
312 return nil, err
313 }
314 if !ok {
315 return nil, p.errorf("mismatched parentheses while parsing %s type", which)
316 }
317 return typ, nil
318}
319
320func (p *Parser) matchTypeUnion(first ast.Type) (*ast.TypeUnion, error) {
321 l := p.lexer

Callers 2

matchTypeErrorBodyMethod · 0.95
matchTypeFusionBodyMethod · 0.95

Calls 3

errorfMethod · 0.95
matchTypeMethod · 0.95
matchMethod · 0.45

Tested by

no test coverage detected