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

Method matchTypeArray

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

Source from the content-addressed store, hash-verified

171}
172
173func (p *Parser) matchTypeArray() (*ast.TypeArray, error) {
174 l := p.lexer
175 if ok, err := l.match('['); !ok || err != nil {
176 return nil, err
177 }
178 typ, err := p.parseType()
179 if err != nil {
180 return nil, err
181 }
182 ok, err := l.match(']')
183 if err != nil {
184 return nil, err
185 }
186 if !ok {
187 return nil, p.error("mismatched brackets while parsing array type")
188 }
189 return &ast.TypeArray{
190 Kind: "TypeArray",
191 Type: typ,
192 }, nil
193}
194
195func (p *Parser) matchTypeSetOrMap() (ast.Type, error) {
196 l := p.lexer

Callers 1

matchTypeComponentMethod · 0.95

Calls 3

parseTypeMethod · 0.95
errorMethod · 0.95
matchMethod · 0.45

Tested by

no test coverage detected