Package com.google.dart.engine.scanner

Examples of com.google.dart.engine.scanner.IncrementalScanner


    }

    // Produce an updated token stream
    CharacterReader reader = new CharSequenceReader(cache.getNewContents());
    BooleanErrorListener errorListener = new BooleanErrorListener();
    IncrementalScanner scanner = new IncrementalScanner(cache.getSource(), reader, errorListener);
    scanner.rescan(
        cache.getResolvedUnit().getBeginToken(),
        cache.getOffset(),
        cache.getOldLength(),
        cache.getNewLength());
    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();
View Full Code Here

TOP

Related Classes of com.google.dart.engine.scanner.IncrementalScanner

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.