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

Method dottedBaseCase

compiler/semantic/expr.go:460–469  ·  view source on GitHub ↗
(loc ast.Node, lhs *ast.IDExpr, rhs *ast.IDExpr, inType super.Type)

Source from the content-addressed store, hash-verified

458}
459
460func (t *translator) dottedBaseCase(loc ast.Node, lhs *ast.IDExpr, rhs *ast.IDExpr, inType super.Type) (sem.Expr, super.Type) {
461 if e, typ := t.idExpand(lhs, false, inType); e != nil {
462 return t.deref(loc, e, rhs, typ)
463 }
464 if t.scope.sql != nil {
465 return t.scope.resolve(t, loc, []string{lhs.Name, rhs.Name}, inType)
466 }
467 id, typ := t.idExpr(lhs, false, inType)
468 return t.deref(loc, id, rhs, typ)
469}
470
471func (t *translator) deref(loc ast.Node, lhs sem.Expr, id *ast.IDExpr, inType super.Type) (sem.Expr, super.Type) {
472 typ, _ := t.checker.deref(id, inType, id.Name)

Callers 1

dotMethod · 0.95

Calls 4

idExpandMethod · 0.95
derefMethod · 0.95
idExprMethod · 0.95
resolveMethod · 0.45

Tested by

no test coverage detected