Esempio n. 1
0
  public boolean isNestedInClosure(IRClosure closure) {
    for (IRScope s = this; s != null && !s.isTopLocalVariableScope(); s = s.getLexicalParent()) {
      if (s == closure) return true;
    }

    return false;
  }
Esempio n. 2
0
  public IRScope getNearestTopLocalVariableScope() {
    IRScope current = this;

    while (current != null && !current.isTopLocalVariableScope()) {
      current = current.getLexicalParent();
    }

    return current;
  }