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

Method Call

runtime/sam/expr/function/types.go:46–56  ·  view source on GitHub ↗
(args []super.Value)

Source from the content-addressed store, hash-verified

44}
45
46func (t *typeName) Call(args []super.Value) super.Value {
47 if super.TypeUnder(args[0].Type()) != super.TypeString {
48 return t.sctx.WrapError("typename: argument must be a string", args[0])
49 }
50 name := string(args[0].Bytes())
51 typ := t.sctx.LookupTypeDef(name)
52 if typ == nil {
53 return t.sctx.Missing()
54 }
55 return t.sctx.LookupTypeValue(typ)
56}
57
58type Error struct {
59 sctx *super.Context

Callers

nothing calls this directly

Calls 7

TypeUnderFunction · 0.92
WrapErrorMethod · 0.80
LookupTypeDefMethod · 0.80
MissingMethod · 0.80
LookupTypeValueMethod · 0.80
TypeMethod · 0.65
BytesMethod · 0.45

Tested by

no test coverage detected