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

Method matchTypeValue

sup/parser-values.go:593–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

591}
592
593func (p *Parser) matchTypeValue() (*ast.TypeValue, error) {
594 l := p.lexer
595 if ok, err := l.match('<'); !ok || err != nil {
596 return nil, noEOF(err)
597 }
598 typ, err := p.parseType()
599 if err != nil {
600 return nil, err
601 }
602 ok, err := l.match('>')
603 if err != nil {
604 return nil, err
605 }
606 if !ok {
607 return nil, p.error("mismatched parentheses while parsing type value")
608 }
609 return &ast.TypeValue{
610 Kind: "TypeValue",
611 Value: typ,
612 }, nil
613}
614
615func ParsePrimitive(typeText, valText string) (super.Value, error) {
616 typ := super.LookupPrimitive(typeText)

Callers 2

matchValueMethod · 0.95
matchFusionMethod · 0.95

Calls 4

parseTypeMethod · 0.95
errorMethod · 0.95
noEOFFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected