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

Unified Diff: pkg/compiler/lib/src/native/scanner.dart

Issue 745533002: Support native extensions for analysis and docgen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
Index: pkg/compiler/lib/src/native/scanner.dart
diff --git a/pkg/compiler/lib/src/native/scanner.dart b/pkg/compiler/lib/src/native/scanner.dart
index a5d72f3b4f4e84cb91f27f9bd9559bcfeb3cf4f1..bbbbb2eaf69a7a70870a97ff2a359418b138f453 100644
--- a/pkg/compiler/lib/src/native/scanner.dart
+++ b/pkg/compiler/lib/src/native/scanner.dart
@@ -6,9 +6,8 @@ part of native;
void checkAllowedLibrary(ElementListener listener, Token token) {
LibraryElement currentLibrary = listener.compilationUnitElement.library;
- if (!currentLibrary.canUseNative) {
- listener.recoverableError(token, "Unexpected token");
- }
+ if (currentLibrary.canUseNative) return;
+ listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED);
}
Token handleNativeBlockToSkip(Listener listener, Token token) {

Powered by Google App Engine
This is Rietveld 408576698