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

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

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/parser/diet_parser_task.dart ('k') | pkg/compiler/lib/src/parser/member_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « pkg/compiler/lib/src/parser/diet_parser_task.dart ('k') | pkg/compiler/lib/src/parser/member_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698