Examples of DeclaredIdentifier


Examples of com.google.dart.engine.ast.DeclaredIdentifier

        iterableSpec,
        0,
        iterableSpec.length(),
        iterableOffset);
    // resolve as: for (name in iterable) {}
    DeclaredIdentifier loopVariable = new DeclaredIdentifier(null, null, null, null, varName);
    Block loopBody = new Block(null, new ArrayList<Statement>(), null);
    ForEachStatement loopStatement = new ForEachStatement(
        null,
        null,
        null,
View Full Code Here

Examples of com.google.dart.engine.ast.DeclaredIdentifier

    // We visit the iterator before the loop variable because the loop variable cannot be in scope
    // while visiting the iterator.
    //
    Expression iterator = node.getIterator();
    safelyVisit(iterator);
    DeclaredIdentifier loopVariable = node.getLoopVariable();
    SimpleIdentifier identifier = node.getIdentifier();
    safelyVisit(loopVariable);
    safelyVisit(identifier);
    Statement body = node.getBody();
    if (body != null) {
      overrideManager.enterScope();
      try {
        if (loopVariable != null && iterator != null) {
          LocalVariableElement loopElement = loopVariable.getElement();
          if (loopElement != null) {
            Type iteratorElementType = getIteratorElementType(iterator);
            overrideVariable(loopElement, iteratorElementType, true);
            recordPropagatedType(loopVariable.getIdentifier(), iteratorElementType);
          }
        } else if (identifier != null && iterator != null) {
          Element identifierElement = identifier.getStaticElement();
          if (identifierElement instanceof VariableElement) {
            Type iteratorElementType = getIteratorElementType(iterator);
View Full Code Here

Examples of com.google.dart.engine.ast.DeclaredIdentifier

    return null;
  }

  @Override
  public Void visitForEachStatement(ForEachStatement node) {
    DeclaredIdentifier loopVariable = node.getLoopVariable();
    if (loopVariable != null) {
      addToScope(loopVariable.getIdentifier());
    }
    return super.visitForEachStatement(node);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.