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

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


  public Void visitFunctionExpression(FunctionExpression node) {
    if (node.getParent() instanceof FunctionDeclaration) {
      // We have already created a function scope and don't need to do so again.
      super.visitFunctionExpression(node);
    } else {
      Scope outerScope = nameScope;
      try {
        ExecutableElement functionElement = node.getElement();
        if (functionElement == null) {
          StringBuilder builder = new StringBuilder();
          builder.append("Missing element for function ");
View Full Code Here


    return null;
  }

  @Override
  public Void visitFunctionTypeAlias(FunctionTypeAlias node) {
    Scope outerScope = nameScope;
    try {
      nameScope = new FunctionTypeScope(nameScope, node.getElement());
      super.visitFunctionTypeAlias(node);
    } finally {
      nameScope = outerScope;
View Full Code Here

    return null;
  }

  @Override
  public Void visitMethodDeclaration(MethodDeclaration node) {
    Scope outerScope = nameScope;
    try {
      ExecutableElement methodElement = node.getElement();
      if (methodElement == null) {
        AnalysisEngine.getInstance().getLogger().logInformation(
            "Missing element for method " + node.getName().getName() + " in "
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;
View Full Code Here

    return null;
  }

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

  protected void visitStatementInScope(Statement node) {
    if (node instanceof Block) {
      // 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

   * @param node the root of the AST structure to be resolved
   * @throws AnalysisException if the node could not be resolved
   */
  public void resolve(AstNode node) throws AnalysisException {
    AstNode rootNode = findResolutionRoot(node);
    Scope scope = ScopeBuilder.scopeFor(rootNode, errorListener);
    if (elementModelChanged(rootNode.getParent())) {
      throw new AnalysisException("Cannot resolve node: element model changed");
    }
    resolveTypes(node, scope);
    resolveVariables(node, scope);
View Full Code Here

TOP

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

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.