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

Unified Diff: pkg/compiler/lib/src/parser/parser.dart

Issue 1851753002: Enable conditional directives by default. (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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/parser/parser.dart
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart
index 42e432becd9afb93159aeec24e8c832ec9477ad6..9122a1c8c9db76997fc1f8f51a2fecf69157b42d 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -98,12 +98,10 @@ class FormalParameterType {
class Parser {
final Listener listener;
bool mayParseFunctionExpressions = true;
- final bool enableConditionalDirectives;
bool asyncAwaitKeywordsEnabled;
Parser(this.listener,
- {this.enableConditionalDirectives: false,
- this.asyncAwaitKeywordsEnabled: false});
+ {this.asyncAwaitKeywordsEnabled: false});
Token parseUnit(Token token) {
listener.beginCompilationUnit(token);
@@ -180,11 +178,9 @@ class Parser {
Token parseConditionalUris(Token token) {
listener.beginConditionalUris(token);
int count = 0;
- if (enableConditionalDirectives) {
- while (optional('if', token)) {
- count++;
- token = parseConditionalUri(token);
- }
+ while (optional('if', token)) {
+ count++;
+ token = parseConditionalUri(token);
}
listener.endConditionalUris(count);
return token;

Powered by Google App Engine
This is Rietveld 408576698