Package com.google.dart.engine.utilities.ast

Examples of com.google.dart.engine.utilities.ast.AstCloner


   * @return a compilation unit that can be modified by the reconciler
   */
  public CompilationUnit getResolvableCompilationUnit() {
    if (parsedUnitState == CacheState.VALID) {
      if (parsedUnitAccessed) {
        return (CompilationUnit) parsedUnit.accept(new AstCloner());
      }
      CompilationUnit unit = parsedUnit;
      parsedUnitState = CacheState.FLUSHED;
      parsedUnitAccessed = false;
      parsedUnit = null;
      return unit;
    }
    ResolutionState state = resolutionState;
    while (state != null) {
      if (state.builtUnitState == CacheState.VALID) {
        // TODO(brianwilkerson) We're cloning the structure to remove any previous resolution data,
        // but I'm not sure that's necessary.
        return (CompilationUnit) state.builtUnit.accept(new AstCloner());
      }
      if (state.resolvedUnitState == CacheState.VALID) {
        return (CompilationUnit) state.resolvedUnit.accept(new AstCloner());
      }
      state = state.nextState;
    };
    return null;
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.utilities.ast.AstCloner

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.