Package com.google.dart.engine.parser

Examples of com.google.dart.engine.parser.IncrementalParser


    if (errorListener.getErrorReported()) {
      return;
    }

    // Produce an updated AST
    IncrementalParser parser = new IncrementalParser(
        cache.getSource(),
        scanner.getTokenMap(),
        AnalysisErrorListener.NULL_LISTENER);
    updatedUnit = parser.reparse(
        cache.getResolvedUnit(),
        scanner.getLeftToken(),
        scanner.getRightToken(),
        cache.getOffset(),
        cache.getOffset() + cache.getOldLength());

    // Update the resolution
    TypeProvider typeProvider = getTypeProvider();
    if (updatedUnit != null && typeProvider != null) {
      CompilationUnitElement element = updatedUnit.getElement();
      if (element != null) {
        LibraryElement library = element.getLibrary();
        if (library != null) {
          IncrementalResolver resolver = new IncrementalResolver(
              library,
              cache.getSource(),
              typeProvider,
              errorListener);
          resolver.resolve(parser.getUpdatedNode());
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.parser.IncrementalParser

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.