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

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

Issue 1388523002: dart2js: add support for configuration-specific imports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update and fix status files. Implement missing functions. Created 5 years 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/parser.dart ('k') | pkg/compiler/lib/src/parser/partial_parser.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_task.dart
diff --git a/pkg/compiler/lib/src/parser/parser_task.dart b/pkg/compiler/lib/src/parser/parser_task.dart
index 5ea0247fec68e30e5ebddd9acb3f8415b0be0f55..fa715aac5b537b4bcba50448ad3312198a88533c 100644
--- a/pkg/compiler/lib/src/parser/parser_task.dart
+++ b/pkg/compiler/lib/src/parser/parser_task.dart
@@ -26,7 +26,13 @@ import 'parser.dart' show
Parser;
class ParserTask extends CompilerTask {
- ParserTask(Compiler compiler) : super(compiler);
+ final bool _enableConditionalDirectives;
+
+ ParserTask(Compiler compiler,
+ {bool enableConditionalDirectives: false})
+ : this._enableConditionalDirectives = enableConditionalDirectives,
+ super(compiler);
+
String get name => 'Parser';
Node parse(ElementX element) {
@@ -37,7 +43,8 @@ class ParserTask extends CompilerTask {
return measure(() {
NodeListener listener = new NodeListener(
const ScannerOptions(), reporter, null);
- Parser parser = new Parser(listener);
+ Parser parser = new Parser(
+ listener, enableConditionalDirectives: _enableConditionalDirectives);
try {
parser.parseUnit(token);
} on ParserError catch(_) {
« no previous file with comments | « pkg/compiler/lib/src/parser/parser.dart ('k') | pkg/compiler/lib/src/parser/partial_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698