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

Unified Diff: sdk/lib/_internal/compiler/implementation/native/scanner.dart

Issue 694353007: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (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: sdk/lib/_internal/compiler/implementation/native/scanner.dart
diff --git a/sdk/lib/_internal/compiler/implementation/native/scanner.dart b/sdk/lib/_internal/compiler/implementation/native/scanner.dart
deleted file mode 100644
index a5d72f3b4f4e84cb91f27f9bd9559bcfeb3cf4f1..0000000000000000000000000000000000000000
--- a/sdk/lib/_internal/compiler/implementation/native/scanner.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of native;
-
-void checkAllowedLibrary(ElementListener listener, Token token) {
- LibraryElement currentLibrary = listener.compilationUnitElement.library;
- if (!currentLibrary.canUseNative) {
- listener.recoverableError(token, "Unexpected token");
- }
-}
-
-Token handleNativeBlockToSkip(Listener listener, Token token) {
- checkAllowedLibrary(listener, token);
- token = token.next;
- if (identical(token.kind, STRING_TOKEN)) {
- token = token.next;
- }
- if (identical(token.stringValue, '{')) {
- BeginGroupToken beginGroupToken = token;
- token = beginGroupToken.endGroup;
- }
- return token;
-}
-
-Token handleNativeFunctionBody(ElementListener listener, Token token) {
- checkAllowedLibrary(listener, token);
- Token begin = token;
- listener.beginReturnStatement(token);
- token = token.next;
- bool hasExpression = false;
- if (identical(token.kind, STRING_TOKEN)) {
- hasExpression = true;
- listener.beginLiteralString(token);
- listener.endLiteralString(0);
- token = token.next;
- }
- listener.endReturnStatement(hasExpression, begin, token);
- // TODO(ngeoffray): expect a ';'.
- // Currently there are method with both native marker and Dart body.
- return token.next;
-}

Powered by Google App Engine
This is Rietveld 408576698