gotools/gopls/internal/cache/parsego/resolver.go

const debugResolve

// resolveFile walks the given file to resolve identifiers within the file
// scope, updating ast.Ident.Obj fields with declaration information.
//
// If declErr is non-nil, it is used to report declaration errors during
// resolution. tok is used to format position in error messages.
func resolveFile(file *ast.File, handle *token.File, declErr func(token.Pos, string)) {}

const maxScopeDepth

type resolver

func (r *resolver) trace(format string, args ...any) {}

func (r *resolver) sprintf(format string, args ...any) string {}

func (r *resolver) openScope(pos token.Pos) {}

func (r *resolver) closeScope() {}

func (r *resolver) openLabelScope() {}

func (r *resolver) closeLabelScope() {}

func (r *resolver) declare(decl, data any, scope *ast.Scope, kind ast.ObjKind, idents ...*ast.Ident) {}

func (r *resolver) shortVarDecl(decl *ast.AssignStmt) {}

var unresolved

// If x is an identifier, resolve attempts to resolve x by looking up
// the object it denotes. If no object is found and collectUnresolved is
// set, x is marked as unresolved and collected in the list of unresolved
// identifiers.
func (r *resolver) resolve(ident *ast.Ident, collectUnresolved bool) {}

func (r *resolver) walkExprs(list []ast.Expr) {}

func (r *resolver) walkLHS(list []ast.Expr) {}

func (r *resolver) walkStmts(list []ast.Stmt) {}

func (r *resolver) Visit(node ast.Node) ast.Visitor {}

func (r *resolver) walkFuncType(typ *ast.FuncType) {}

func (r *resolver) resolveList(list *ast.FieldList) {}

func (r *resolver) declareList(list *ast.FieldList, kind ast.ObjKind) {}

func (r *resolver) walkRecv(recv *ast.FieldList) {}

func (r *resolver) walkFieldList(list *ast.FieldList, kind ast.ObjKind) {}

// walkTParams is like walkFieldList, but declares type parameters eagerly so
// that they may be resolved in the constraint expressions held in the field
// Type.
func (r *resolver) walkTParams(list *ast.FieldList) {}

func (r *resolver) walkBody(body *ast.BlockStmt) {}