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

Method matchTypeComponent

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

Source from the content-addressed store, hash-verified

27}
28
29func (p *Parser) matchTypeComponent() (ast.Type, error) {
30 if typ, err := p.matchTypeName(); typ != nil || err != nil {
31 return typ, err
32 }
33 if typ, err := p.matchTypeRecord(); typ != nil || err != nil {
34 return typ, err
35 }
36 if typ, err := p.matchTypeArray(); typ != nil || err != nil {
37 return typ, err
38 }
39 if typ, err := p.matchTypeSetOrMap(); typ != nil || err != nil {
40 return typ, err
41 }
42 if typ, err := p.matchTypeParens(); typ != nil || err != nil {
43 return typ, err
44 }
45 // no match
46 return nil, nil
47}
48
49func (p *Parser) matchIdentifier() (string, error) {
50 l := p.lexer

Callers 4

matchTypeMethod · 0.95
matchTypeUnionMethod · 0.95
parseDecoratorMethod · 0.95
matchNoneMethod · 0.95

Calls 5

matchTypeNameMethod · 0.95
matchTypeRecordMethod · 0.95
matchTypeArrayMethod · 0.95
matchTypeSetOrMapMethod · 0.95
matchTypeParensMethod · 0.95

Tested by

no test coverage detected