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

Method semCall

compiler/semantic/expr.go:730–743  ·  view source on GitHub ↗
(call *ast.CallExpr, inType super.Type)

Source from the content-addressed store, hash-verified

728}
729
730func (t *translator) semCall(call *ast.CallExpr, inType super.Type) (sem.Expr, super.Type) {
731 if e, typ := t.maybeConvertAgg(call, inType); e != nil {
732 return e, typ
733 }
734 args, argTypes := t.exprs(call.Args, inType)
735 switch f := call.Func.(type) {
736 case *ast.FuncNameExpr:
737 return t.semCallByName(call, f.Name, args, argTypes, inType)
738 case *ast.LambdaExpr:
739 return t.semCallLambda(f, args, argTypes)
740 default:
741 panic(f)
742 }
743}
744
745func (t *translator) maybeSubquery(n ast.Node, name string, inType super.Type) (*sem.SubqueryExpr, super.Type) {
746 if seq, typ := t.scope.lookupQuery(t, name); seq != nil {

Callers 2

maybeCallShortcutMethod · 0.95
exprMethod · 0.95

Calls 4

maybeConvertAggMethod · 0.95
exprsMethod · 0.95
semCallByNameMethod · 0.95
semCallLambdaMethod · 0.95

Tested by

no test coverage detected