IsLocalVariable reports whether the variable name is locally bound by the folder scope.
(name string)
| 2095 | |
| 2096 | // IsLocalVariable reports whether the variable name is locally bound by the folder scope. |
| 2097 | func (f *folder) IsLocalVariable(name string) bool { |
| 2098 | if name == f.accuVar { |
| 2099 | return true |
| 2100 | } |
| 2101 | if !f.computeResult && (name == f.iterVar || name == f.iterVar2) { |
| 2102 | return true |
| 2103 | } |
| 2104 | if varHolder, ok := f.Parent().(localVariableHolder); ok { |
| 2105 | if varHolder.IsLocalVariable(name) { |
| 2106 | return true |
| 2107 | } |
| 2108 | } |
| 2109 | return false |
| 2110 | } |
| 2111 | |
| 2112 | // UnknownAttributePatterns implements the PartialActivation interface returning the unknown patterns |
| 2113 | // if they were provided to the input activation, or an empty set if the proxied activation is not partial. |
nothing calls this directly
no test coverage detected