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

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

Issue 1864433004: Repeats and fixes the changes landed & reverted as CL 1789553003. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updates to external dependents 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/parser/parser_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..80e6de224e45c5fdb06da3c0743ddd3477add81b 100644
--- a/pkg/compiler/lib/src/parser/parser.dart
+++ b/pkg/compiler/lib/src/parser/parser.dart
@@ -4,6 +4,8 @@
library dart2js.parser;
+import '../options.dart' show
+ ParserOptions;
import '../common.dart';
import '../tokens/keyword.dart' show
Keyword;
@@ -97,13 +99,12 @@ class FormalParameterType {
*/
class Parser {
final Listener listener;
+ final ParserOptions parserOptions;
bool mayParseFunctionExpressions = true;
- final bool enableConditionalDirectives;
bool asyncAwaitKeywordsEnabled;
- Parser(this.listener,
- {this.enableConditionalDirectives: false,
- this.asyncAwaitKeywordsEnabled: false});
+ Parser(this.listener, this.parserOptions,
+ {this.asyncAwaitKeywordsEnabled: false});
Token parseUnit(Token token) {
listener.beginCompilationUnit(token);
@@ -180,7 +181,7 @@ class Parser {
Token parseConditionalUris(Token token) {
listener.beginConditionalUris(token);
int count = 0;
- if (enableConditionalDirectives) {
+ if (parserOptions.enableConditionalDirectives) {
while (optional('if', token)) {
count++;
token = parseConditionalUri(token);
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/parser/parser_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698