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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.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, 10 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/context/context.dart ('k') | pkg/analyzer/lib/src/task/dart.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) 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;
1624 parser.parseGenericMethods = options.enableGenericMethods; 1625 parser.parseGenericMethods = options.enableGenericMethods;
1625 CompilationUnit unit = parser.parseCompilationUnit(token); 1626 CompilationUnit unit = parser.parseCompilationUnit(token);
1626 _newParseErrors = errorListener.errors; 1627 _newParseErrors = errorListener.errors;
1627 return unit; 1628 return unit;
1628 } finally { 1629 } finally {
1629 timer.stop('parse'); 1630 timer.stop('parse');
1630 } 1631 }
1631 } 1632 }
1632 1633
1633 /** 1634 /**
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 @override 2202 @override
2202 String toString() => name; 2203 String toString() => name;
2203 } 2204 }
2204 2205
2205 class _TokenPair { 2206 class _TokenPair {
2206 final _TokenDifferenceKind kind; 2207 final _TokenDifferenceKind kind;
2207 final Token oldToken; 2208 final Token oldToken;
2208 final Token newToken; 2209 final Token newToken;
2209 _TokenPair(this.kind, this.oldToken, this.newToken); 2210 _TokenPair(this.kind, this.oldToken, this.newToken);
2210 } 2211 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698