| Index: pkg/compiler/lib/src/parser/element_listener.dart
|
| diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
|
| index 48bfae3139327643294a3ba0855a560138244dde..fa524cc9365050aadfef18bc3f1d7c0d29b143ec 100644
|
| --- a/pkg/compiler/lib/src/parser/element_listener.dart
|
| +++ b/pkg/compiler/lib/src/parser/element_listener.dart
|
| @@ -4,6 +4,8 @@
|
|
|
| library dart2js.parser.element_listener;
|
|
|
| +import '../compiler.dart' show
|
| + Compiler;
|
| import '../common.dart';
|
| import '../diagnostics/messages.dart' show
|
| MessageTemplate;
|
| @@ -57,11 +59,17 @@ typedef int IdGenerator();
|
| /// Options used for scanning.
|
| ///
|
| /// Use this to conditionally support special tokens.
|
| +///
|
| +/// TODO(johnniwinther): This class should be renamed, it is not about options
|
| +/// in the same sense as `CompilerOptions` or `DiagnosticOptions`.
|
| class ScannerOptions {
|
| /// If `true` the pseudo keyword `native` is supported.
|
| final bool canUseNative;
|
|
|
| const ScannerOptions({this.canUseNative: false});
|
| +
|
| + ScannerOptions.from(Compiler compiler, LibraryElement libraryElement) :
|
| + canUseNative = compiler.backend.canLibraryUseNative(libraryElement);
|
| }
|
|
|
| /**
|
|
|