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

Function ParseType

sup/sup.go:62–69  ·  view source on GitHub ↗
(sctx *super.Context, sup string)

Source from the content-addressed store, hash-verified

60}
61
62func ParseType(sctx *super.Context, sup string) (super.Type, error) {
63 zp := NewParser(strings.NewReader(sup))
64 ast, err := zp.parseType()
65 if ast == nil || noEOF(err) != nil {
66 return nil, err
67 }
68 return NewAnalyzer().convertType(sctx, ast)
69}
70
71func ParseValue(sctx *super.Context, sup string) (super.Value, error) {
72 zp := NewParser(strings.NewReader(sup))

Callers 6

TestDuplicatesFunction · 0.92
TestTranslateNamedFunction · 0.92
TestTypeValueFunction · 0.92
TestFieldNameIterFunction · 0.92

Calls 6

parseTypeMethod · 0.95
NewAnalyzerFunction · 0.85
convertTypeMethod · 0.80
NewParserFunction · 0.70
noEOFFunction · 0.70
NewReaderMethod · 0.45

Tested by 6

TestDuplicatesFunction · 0.74
TestTranslateNamedFunction · 0.74
TestTypeValueFunction · 0.74
TestFieldNameIterFunction · 0.74