MCPcopy Create free account
hub / github.com/decomp/decomp / isTopName

Function isTopName

cmd/go-post/fix.go:340–343  ·  view source on GitHub ↗

isTopName returns true if n is a top-level unresolved identifier with the given name.

(n ast.Expr, name string)

Source from the content-addressed store, hash-verified

338
339// isTopName returns true if n is a top-level unresolved identifier with the given name.
340func isTopName(n ast.Expr, name string) bool {
341 id, ok := n.(*ast.Ident)
342 return ok && id.Name == name && id.Obj == nil
343}
344
345// isName returns true if n is an identifier with the given name.
346func isName(n ast.Expr, name string) bool {

Callers 4

typecheck1Function · 0.85
isPkgDotFunction · 0.85
renameTopFunction · 0.85
usesImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected