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

Side by Side Diff: pkg/compiler/lib/src/native/scanner.dart

Issue 1762723002: Cleanup 1: split parts into their own libraries, remove unused imports (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of native; 5 import '../common.dart';
6 import '../parser/listener.dart' show
7 Listener;
8 import '../parser/element_listener.dart' show
9 ElementListener;
10 import '../tokens/token.dart' show
11 BeginGroupToken,
12 Token;
13 import '../tokens/token_constants.dart' as Tokens show
14 EOF_TOKEN,
15 STRING_TOKEN;
6 16
7 void checkAllowedLibrary(ElementListener listener, Token token) { 17 void checkAllowedLibrary(ElementListener listener, Token token) {
8 if (listener.scannerOptions.canUseNative) return; 18 if (listener.scannerOptions.canUseNative) return;
9 listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED); 19 listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED);
10 } 20 }
11 21
12 Token handleNativeBlockToSkip(Listener listener, Token token) { 22 Token handleNativeBlockToSkip(Listener listener, Token token) {
13 checkAllowedLibrary(listener, token); 23 checkAllowedLibrary(listener, token);
14 token = token.next; 24 token = token.next;
15 if (identical(token.kind, Tokens.STRING_TOKEN)) { 25 if (identical(token.kind, Tokens.STRING_TOKEN)) {
(...skipping 16 matching lines...) Expand all
32 hasExpression = true; 42 hasExpression = true;
33 listener.beginLiteralString(token); 43 listener.beginLiteralString(token);
34 listener.endLiteralString(0); 44 listener.endLiteralString(0);
35 token = token.next; 45 token = token.next;
36 } 46 }
37 listener.endReturnStatement(hasExpression, begin, token); 47 listener.endReturnStatement(hasExpression, begin, token);
38 // TODO(ngeoffray): expect a ';'. 48 // TODO(ngeoffray): expect a ';'.
39 // Currently there are method with both native marker and Dart body. 49 // Currently there are method with both native marker and Dart body.
40 return token.next; 50 return token.next;
41 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698