root returns the topmost function context corresponding to the package scope.
()
| 30 | |
| 31 | // root returns the topmost function context corresponding to the package scope. |
| 32 | func (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. |
| 40 | func (fc *funcContext) isRoot() bool { |