Index: pkg/compiler/lib/src/parser/diet_parser_task.dart |
diff --git a/pkg/compiler/lib/src/parser/diet_parser_task.dart b/pkg/compiler/lib/src/parser/diet_parser_task.dart |
index 10a0a9f7df255b9414b206ddac8b7575f63d5763..9afc8d4dcb90e6f532ce029a5d19aaad3aaa18f7 100644 |
--- a/pkg/compiler/lib/src/parser/diet_parser_task.dart |
+++ b/pkg/compiler/lib/src/parser/diet_parser_task.dart |
@@ -23,7 +23,12 @@ import 'partial_parser.dart' show |
PartialParser; |
class DietParserTask extends CompilerTask { |
- DietParserTask(Compiler compiler) : super(compiler); |
+ final bool _enableConditionalDirectives; |
+ |
+ DietParserTask(Compiler compiler, {bool enableConditionalDirectives}) |
+ : this._enableConditionalDirectives = enableConditionalDirectives, |
+ super(compiler); |
+ |
final String name = 'Diet Parser'; |
dietParse(CompilationUnitElement compilationUnit, Token tokens) { |
@@ -34,7 +39,8 @@ class DietParserTask extends CompilerTask { |
compilationUnit.library)); |
ElementListener listener = new ElementListener( |
scannerOptions, compiler.reporter, compilationUnit, idGenerator); |
- PartialParser parser = new PartialParser(listener); |
+ PartialParser parser = new PartialParser( |
+ listener, enableConditionalDirectives: _enableConditionalDirectives); |
try { |
parser.parseUnit(tokens); |
} on ParserError catch(_) { |