@Override public ASScope getASScope() { ASScope scope = super.getASScope(); if (scope instanceof WithScope) { // If this expression is part of the target expression of a with node // then we want the scope containing the with scope, not the with scope itself. IExpressionNode baseExpr = this.getDecorationNode(); IASNode parent = baseExpr.getParent(); if (parent instanceof WithNode) { WithNode withParent = (WithNode)parent; if (withParent.getTargetNode() == baseExpr) { return withParent.getASScope(); } } } return scope; }
@Override public ASScope getASScope() { ASScope scope = super.getASScope(); if (scope instanceof WithScope) { // If this expression is part of the target expression of a with node // then we want the scope containing the with scope, not the with scope itself. IExpressionNode baseExpr = this.getDecorationNode(); IASNode parent = baseExpr.getParent(); if (parent instanceof WithNode) { WithNode withParent = (WithNode)parent; if (withParent.getTargetNode() == baseExpr) { return withParent.getASScope(); } } } return scope; }