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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1851753002: Enable conditional directives by default. (Closed) Base URL: git@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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.generated.incremental_resolver; 5 library analyzer.src.generated.incremental_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 return false; 1614 return false;
1615 } 1615 }
1616 1616
1617 CompilationUnit _parseUnit(String code) { 1617 CompilationUnit _parseUnit(String code) {
1618 LoggingTimer timer = logger.startTimer(); 1618 LoggingTimer timer = logger.startTimer();
1619 try { 1619 try {
1620 Token token = _scan(code); 1620 Token token = _scan(code);
1621 RecordingErrorListener errorListener = new RecordingErrorListener(); 1621 RecordingErrorListener errorListener = new RecordingErrorListener();
1622 Parser parser = new Parser(_unitSource, errorListener); 1622 Parser parser = new Parser(_unitSource, errorListener);
1623 AnalysisOptions options = _unitElement.context.analysisOptions; 1623 AnalysisOptions options = _unitElement.context.analysisOptions;
1624 parser.parseConditionalDirectives = options.enableConditionalDirectives;
1625 parser.parseGenericMethods = options.enableGenericMethods; 1624 parser.parseGenericMethods = options.enableGenericMethods;
1626 CompilationUnit unit = parser.parseCompilationUnit(token); 1625 CompilationUnit unit = parser.parseCompilationUnit(token);
1627 _newParseErrors = errorListener.errors; 1626 _newParseErrors = errorListener.errors;
1628 return unit; 1627 return unit;
1629 } finally { 1628 } finally {
1630 timer.stop('parse'); 1629 timer.stop('parse');
1631 } 1630 }
1632 } 1631 }
1633 1632
1634 /** 1633 /**
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 @override 2217 @override
2219 String toString() => name; 2218 String toString() => name;
2220 } 2219 }
2221 2220
2222 class _TokenPair { 2221 class _TokenPair {
2223 final _TokenDifferenceKind kind; 2222 final _TokenDifferenceKind kind;
2224 final Token oldToken; 2223 final Token oldToken;
2225 final Token newToken; 2224 final Token newToken;
2226 _TokenPair(this.kind, this.oldToken, this.newToken); 2225 _TokenPair(this.kind, this.oldToken, this.newToken);
2227 } 2226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698