else if (parent instanceof VariableRef) { Variable var = ((VariableRef)parent).getVariable(); Expression exp = var.getExpression();
else if (parent instanceof VariableRefBase) { final VariableRefBase ref = (VariableRefBase)parent; final VariableBase var = ref.getVariable(); final Expression exp = var.getExpression();
    public int getPosType() {	if (_ptype == -1) {	    SyntaxTreeNode parent = getParent();	    if (parent instanceof StepPattern) {		_ptype = ((StepPattern)parent).getNodeType();	    }	    else if (parent instanceof AbsoluteLocationPath) {		AbsoluteLocationPath path = (AbsoluteLocationPath)parent;		Expression exp = path.getPath();		if (exp instanceof Step) {		    _ptype = ((Step)exp).getNodeType();		}	    }	    else if (parent instanceof VariableRef) {		Variable var = ((VariableRef)parent).getVariable();		Expression exp = var.getExpression();		if (exp instanceof Step) {		    _ptype = ((Step)exp).getNodeType();		}	    }	    else if (parent instanceof Step) {		_ptype = ((Step)parent).getNodeType();	    }	}	return _ptype;    }