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

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

Issue 1744773002: Support conditional directives in the options file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3358 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); 3358 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
3359 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); 3359 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
3360 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); 3360 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
3361 3361
3362 RecordingErrorListener errorListener = new RecordingErrorListener(); 3362 RecordingErrorListener errorListener = new RecordingErrorListener();
3363 Parser parser = new Parser(source, errorListener); 3363 Parser parser = new Parser(source, errorListener);
3364 AnalysisOptions options = context.analysisOptions; 3364 AnalysisOptions options = context.analysisOptions;
3365 parser.parseAsync = options.enableAsync; 3365 parser.parseAsync = options.enableAsync;
3366 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); 3366 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source);
3367 parser.parseGenericMethods = options.enableGenericMethods; 3367 parser.parseGenericMethods = options.enableGenericMethods;
3368 parser.parseConditionalDirectives = options.enableConditionalDirectives;
3368 parser.parseGenericMethodComments = options.strongMode; 3369 parser.parseGenericMethodComments = options.strongMode;
3369 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); 3370 CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
3370 unit.lineInfo = lineInfo; 3371 unit.lineInfo = lineInfo;
3371 3372
3372 bool hasNonPartOfDirective = false; 3373 bool hasNonPartOfDirective = false;
3373 bool hasPartOfDirective = false; 3374 bool hasPartOfDirective = false;
3374 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); 3375 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
3375 HashSet<Source> exportedSourceSet = new HashSet<Source>(); 3376 HashSet<Source> exportedSourceSet = new HashSet<Source>();
3376 HashSet<Source> includedSourceSet = new HashSet<Source>(); 3377 HashSet<Source> includedSourceSet = new HashSet<Source>();
3377 for (Directive directive in unit.directives) { 3378 for (Directive directive in unit.directives) {
(...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
5258 5259
5259 @override 5260 @override
5260 bool moveNext() { 5261 bool moveNext() {
5261 if (_newSources.isEmpty) { 5262 if (_newSources.isEmpty) {
5262 return false; 5263 return false;
5263 } 5264 }
5264 currentTarget = _newSources.removeLast(); 5265 currentTarget = _newSources.removeLast();
5265 return true; 5266 return true;
5266 } 5267 }
5267 } 5268 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698