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

Method resolveFixed

compiler/semantic/resolver.go:136–155  ·  view source on GitHub ↗
(d *funcDecl, tag string, inType super.Type)

Source from the content-addressed store, hash-verified

134}
135
136func (r *resolver) resolveFixed(d *funcDecl, tag string, inType super.Type) *funcDef {
137 save := r.t.scope
138 r.t.scope = NewScope(d.scope)
139 defer func() {
140 r.t.scope = save
141 }()
142 r.t.enterScope()
143 params := idsToStrings(d.lambda.Params)
144 for _, param := range params {
145 r.t.scope.BindSymbol(param, funcParamValue{})
146 }
147 body, _ := r.t.expr(d.lambda.Expr, r.t.checker.unknown) //XXX need type
148 r.t.exitScope()
149 return &funcDef{
150 tag: tag,
151 name: d.name,
152 params: params,
153 body: body,
154 }
155}
156
157func (r *resolver) lookupFixed(id string, inType super.Type) (string, super.Type) {
158 if tag, ok := r.fixed[id]; ok {

Callers 1

lookupFixedMethod · 0.95

Calls 6

NewScopeFunction · 0.85
idsToStringsFunction · 0.85
enterScopeMethod · 0.80
BindSymbolMethod · 0.80
exitScopeMethod · 0.80
exprMethod · 0.45

Tested by

no test coverage detected