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

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

Issue 1789553003: Introduces `ParserOptions`. (Closed) Base URL: https://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_task.dart
diff --git a/pkg/compiler/lib/src/parser/parser_task.dart b/pkg/compiler/lib/src/parser/parser_task.dart
index fa715aac5b537b4bcba50448ad3312198a88533c..fd4f0ffa83e084199abeaf7124a124eff47953e6 100644
--- a/pkg/compiler/lib/src/parser/parser_task.dart
+++ b/pkg/compiler/lib/src/parser/parser_task.dart
@@ -23,15 +23,13 @@ import 'listener.dart' show
import 'node_listener.dart' show
NodeListener;
import 'parser.dart' show
- Parser;
+ Parser,
+ ParserOptions;
class ParserTask extends CompilerTask {
- final bool _enableConditionalDirectives;
+ final ParserOptions parserOptions;
- ParserTask(Compiler compiler,
- {bool enableConditionalDirectives: false})
- : this._enableConditionalDirectives = enableConditionalDirectives,
- super(compiler);
+ ParserTask(Compiler compiler, this.parserOptions) : super(compiler);
String get name => 'Parser';
@@ -43,8 +41,7 @@ class ParserTask extends CompilerTask {
return measure(() {
NodeListener listener = new NodeListener(
const ScannerOptions(), reporter, null);
- Parser parser = new Parser(
- listener, enableConditionalDirectives: _enableConditionalDirectives);
+ Parser parser = new Parser(listener, parserOptions);
try {
parser.parseUnit(token);
} on ParserError catch(_) {

Powered by Google App Engine
This is Rietveld 408576698