src/main/java/com/bazaarvoice/jless/ast/node/VariableReferenceNode.java
public String getValue() {
        for (ScopeNode scope = NodeTreeUtils.getParentScope(this); scope != null; scope = NodeTreeUtils.getParentScope(scope)) {
            ExpressionGroupNode value = scope.getVariable(_name);
            if (value == null) {
                continue;
            }

            return value.toString();
        }

        return _name; // Unable to find the variable's value, return the name for now (helpful for debugging)
    }
public String getValue() {
        for (ScopeNode scope = NodeTreeUtils.getParentScope(this); scope != null; scope = NodeTreeUtils.getParentScope(scope)) {
            ExpressionGroupNode value = scope.getVariable(_name);
            if (value == null) {
                continue;
            }

            return value.toString();
        }

        return _name; // Unable to find the variable's value, return the name for now (helpful for debugging)
    }
public String getValue ( ) { for ( ScopeNode scope = NodeTreeUtils . getParentScope ( this ) ; scope != null ; scope = NodeTreeUtils . getParentScope ( scope ) ) { ExpressionGroupNode value = scope . getVariable ( _name ) ; if ( value == null ) { continue ; } return value . toString ( ) ; } return _name ; // Unable to find the variable's value, return the name for now (helpful for debugging) }
Search up the scope tree to locate the variable's value. The parser has already verified that
the variable is defined.
Search up the scope tree to locate the variable s value . The parser has already verified that the variable is defined .