Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1570183002: add parser parseAsync flag (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after
3543 @override 3543 @override
3544 void internalPerform() { 3544 void internalPerform() {
3545 Source source = getRequiredSource(); 3545 Source source = getRequiredSource();
3546 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); 3546 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
3547 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); 3547 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
3548 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); 3548 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
3549 3549
3550 RecordingErrorListener errorListener = new RecordingErrorListener(); 3550 RecordingErrorListener errorListener = new RecordingErrorListener();
3551 Parser parser = new Parser(source, errorListener); 3551 Parser parser = new Parser(source, errorListener);
3552 AnalysisOptions options = context.analysisOptions; 3552 AnalysisOptions options = context.analysisOptions;
3553 parser.parseAsync = options.enableAsync;
3553 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); 3554 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source);
3554 parser.parseGenericMethods = options.enableGenericMethods; 3555 parser.parseGenericMethods = options.enableGenericMethods;
3555 parser.parseGenericMethodComments = options.strongMode; 3556 parser.parseGenericMethodComments = options.strongMode;
3556 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); 3557 CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
3557 unit.lineInfo = lineInfo; 3558 unit.lineInfo = lineInfo;
3558 3559
3559 bool hasNonPartOfDirective = false; 3560 bool hasNonPartOfDirective = false;
3560 bool hasPartOfDirective = false; 3561 bool hasPartOfDirective = false;
3561 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); 3562 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
3562 HashSet<Source> exportedSourceSet = new HashSet<Source>(); 3563 HashSet<Source> exportedSourceSet = new HashSet<Source>();
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 5486
5486 @override 5487 @override
5487 bool moveNext() { 5488 bool moveNext() {
5488 if (_newSources.isEmpty) { 5489 if (_newSources.isEmpty) {
5489 return false; 5490 return false;
5490 } 5491 }
5491 currentTarget = _newSources.removeLast(); 5492 currentTarget = _newSources.removeLast();
5492 return true; 5493 return true;
5493 } 5494 }
5494 } 5495 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/utilities_general.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698