IsLocalVariable reports whether the variable name is locally bound by the folder scope.
(name string)
| 1646 | |
| 1647 | // IsLocalVariable reports whether the variable name is locally bound by the folder scope. |
| 1648 | func (f *folder) IsLocalVariable(name string) bool { |
| 1649 | if name == f.accuVar { |
| 1650 | return true |
| 1651 | } |
| 1652 | if !f.computeResult && (name == f.iterVar || name == f.iterVar2) { |
| 1653 | return true |
| 1654 | } |
| 1655 | parent := f.Parent() |
| 1656 | if parent == nil { |
| 1657 | return false |
| 1658 | } |
| 1659 | if varHolder, ok := parent.(localVariableHolder); ok { |
| 1660 | if varHolder.IsLocalVariable(name) { |
| 1661 | return true |
| 1662 | } |
| 1663 | } |
| 1664 | return false |
| 1665 | } |
| 1666 | |
| 1667 | // UnknownAttributePatterns implements the PartialActivation interface returning the unknown patterns |
| 1668 | // 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