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

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

Issue 1892523002: Clean up flags for conditional directives (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3484 matching lines...) Expand 10 before | Expand all | Expand 10 after
3495 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); 3495 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
3496 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); 3496 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
3497 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); 3497 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
3498 3498
3499 RecordingErrorListener errorListener = new RecordingErrorListener(); 3499 RecordingErrorListener errorListener = new RecordingErrorListener();
3500 Parser parser = new Parser(source, errorListener); 3500 Parser parser = new Parser(source, errorListener);
3501 AnalysisOptions options = context.analysisOptions; 3501 AnalysisOptions options = context.analysisOptions;
3502 parser.parseAsync = options.enableAsync; 3502 parser.parseAsync = options.enableAsync;
3503 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); 3503 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source);
3504 parser.parseGenericMethods = options.enableGenericMethods; 3504 parser.parseGenericMethods = options.enableGenericMethods;
3505 parser.parseConditionalDirectives = options.enableConditionalDirectives;
3506 parser.parseGenericMethodComments = options.strongMode; 3505 parser.parseGenericMethodComments = options.strongMode;
3507 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); 3506 CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
3508 unit.lineInfo = lineInfo; 3507 unit.lineInfo = lineInfo;
3509 3508
3510 bool hasNonPartOfDirective = false; 3509 bool hasNonPartOfDirective = false;
3511 bool hasPartOfDirective = false; 3510 bool hasPartOfDirective = false;
3512 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); 3511 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
3513 HashSet<Source> exportedSourceSet = new HashSet<Source>(); 3512 HashSet<Source> exportedSourceSet = new HashSet<Source>();
3514 HashSet<Source> includedSourceSet = new HashSet<Source>(); 3513 HashSet<Source> includedSourceSet = new HashSet<Source>();
3515 for (Directive directive in unit.directives) { 3514 for (Directive directive in unit.directives) {
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
5492 5491
5493 @override 5492 @override
5494 bool moveNext() { 5493 bool moveNext() {
5495 if (_newSources.isEmpty) { 5494 if (_newSources.isEmpty) {
5496 return false; 5495 return false;
5497 } 5496 }
5498 currentTarget = _newSources.removeLast(); 5497 currentTarget = _newSources.removeLast();
5499 return true; 5498 return true;
5500 } 5499 }
5501 } 5500 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698