| 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 94da7df08af7ae5cac8a16827184f56159c47906..0cdf72ed1dd720c6c44d70f65d949e73449ad4de 100644
|
| --- a/pkg/compiler/lib/src/parser/element_listener.dart
|
| +++ b/pkg/compiler/lib/src/parser/element_listener.dart
|
| @@ -54,6 +54,16 @@ import 'listener.dart' show
|
|
|
| typedef int IdGenerator();
|
|
|
| +/// Options used for scanning.
|
| +///
|
| +/// Use this to conditionally support special tokens.
|
| +class ScannerOptions {
|
| + /// If `true` the pseudo keyword `native` is supported.
|
| + final bool canUseNative;
|
| +
|
| + const ScannerOptions({this.canUseNative: false});
|
| +}
|
| +
|
| /**
|
| * A parser event listener designed to work with [PartialParser]. It
|
| * builds elements representing the top-level declarations found in
|
| @@ -63,6 +73,7 @@ typedef int IdGenerator();
|
| class ElementListener extends Listener {
|
| final IdGenerator idGenerator;
|
| final DiagnosticReporter reporter;
|
| + final ScannerOptions scannerOptions;
|
| final CompilationUnitElementX compilationUnitElement;
|
| final StringValidator stringValidator;
|
| Link<StringQuoting> interpolationScope;
|
| @@ -84,6 +95,7 @@ class ElementListener extends Listener {
|
| bool suppressParseErrors = false;
|
|
|
| ElementListener(
|
| + this.scannerOptions,
|
| DiagnosticReporter reporter,
|
| this.compilationUnitElement,
|
| this.idGenerator)
|
|
|