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

Method resolveCall

compiler/semantic/resolver.go:61–72  ·  view source on GitHub ↗
(n ast.Node, id string, args []sem.Expr, argTypes []super.Type)

Source from the content-addressed store, hash-verified

59}
60
61func (r *resolver) resolveCall(n ast.Node, id string, args []sem.Expr, argTypes []super.Type) (sem.Expr, super.Type) {
62 if isBuiltin(id) {
63 // Check argument count here for builtin functions.
64 if _, err := function.New(super.NewContext(), id, len(args)); err != nil {
65 r.t.error(n, err)
66 return badExpr, r.t.checker.unknown
67 }
68 // Type checking of functions is TBD. Return unknown for now.
69 return sem.NewCall(n, id, args), r.t.checker.unknown
70 }
71 return r.mustResolveCall(n, id, args, argTypes)
72}
73
74func (r *resolver) mustResolveCall(n ast.Node, id string, args []sem.Expr, argTypes []super.Type) (sem.Expr, super.Type) {
75 d, ok := r.decls[id]

Callers 1

semMapCallMethod · 0.80

Calls 6

mustResolveCallMethod · 0.95
NewFunction · 0.92
NewContextFunction · 0.92
NewCallFunction · 0.92
isBuiltinFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected