Package com.google.dart.engine.internal.scope

Examples of com.google.dart.engine.internal.scope.EnclosedScope


   * Pushes a new {@link Scope} into the visitor.
   *
   * @return the new {@link Scope}.
   */
  public Scope pushNameScope() {
    Scope newScope = new EnclosedScope(nameScope);
    nameScope = newScope;
    return nameScope;
  }
View Full Code Here


  @Override
  public Void visitBlock(Block node) {
    Scope outerScope = nameScope;
    try {
      EnclosedScope enclosedScope = new EnclosedScope(nameScope);
      hideNamesDefinedInBlock(enclosedScope, node);
      nameScope = enclosedScope;
      super.visitBlock(node);
    } finally {
      nameScope = outerScope;
View Full Code Here

  public Void visitCatchClause(CatchClause node) {
    SimpleIdentifier exception = node.getExceptionParameter();
    if (exception != null) {
      Scope outerScope = nameScope;
      try {
        nameScope = new EnclosedScope(nameScope);
        nameScope.define(exception.getStaticElement());
        SimpleIdentifier stackTrace = node.getStackTraceParameter();
        if (stackTrace != null) {
          nameScope.define(stackTrace.getStaticElement());
        }
View Full Code Here

  @Override
  public Void visitForEachStatement(ForEachStatement node) {
    Scope outerNameScope = nameScope;
    LabelScope outerLabelScope = labelScope;
    try {
      nameScope = new EnclosedScope(nameScope);
      labelScope = new LabelScope(outerLabelScope, false, false);
      visitForEachStatementInScope(node);
    } finally {
      labelScope = outerLabelScope;
      nameScope = outerNameScope;
View Full Code Here

  @Override
  public Void visitForStatement(ForStatement node) {
    Scope outerNameScope = nameScope;
    LabelScope outerLabelScope = labelScope;
    try {
      nameScope = new EnclosedScope(nameScope);
      labelScope = new LabelScope(outerLabelScope, false, false);
      visitForStatementInScope(node);
    } finally {
      labelScope = outerLabelScope;
      nameScope = outerNameScope;
View Full Code Here

  @Override
  public Void visitSwitchCase(SwitchCase node) {
    node.getExpression().accept(this);
    Scope outerNameScope = nameScope;
    try {
      nameScope = new EnclosedScope(nameScope);
      node.getStatements().accept(this);
    } finally {
      nameScope = outerNameScope;
    }
    return null;
View Full Code Here

  @Override
  public Void visitSwitchDefault(SwitchDefault node) {
    Scope outerNameScope = nameScope;
    try {
      nameScope = new EnclosedScope(nameScope);
      node.getStatements().accept(this);
    } finally {
      nameScope = outerNameScope;
    }
    return null;
View Full Code Here

      // Don't create a scope around a block because the block will create it's own scope.
      visitBlock((Block) node);
    } else if (node != null) {
      Scope outerNameScope = nameScope;
      try {
        nameScope = new EnclosedScope(nameScope);
        node.accept(this);
      } finally {
        nameScope = outerNameScope;
      }
    }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.internal.scope.EnclosedScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.