MCPcopy
hub / github.com/gopherjs/gopherjs / root

Method root

compiler/utils.go:32–37  ·  view source on GitHub ↗

root returns the topmost function context corresponding to the package scope.

()

Source from the content-addressed store, hash-verified

30
31// root returns the topmost function context corresponding to the package scope.
32func (fc *funcContext) root() *funcContext {
33 if fc.isRoot() {
34 return fc
35 }
36 return fc.parent.root()
37}
38
39// isRoot returns true for the package-level context.
40func (fc *funcContext) isRoot() bool {

Callers 1

objectNameMethod · 0.95

Calls 1

isRootMethod · 0.95

Tested by

no test coverage detected