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

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

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/native/ssa.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import '../common.dart'; 5 import '../common.dart';
6 import '../parser/listener.dart' show 6 import '../parser/listener.dart' show Listener;
7 Listener; 7 import '../parser/element_listener.dart' show ElementListener;
8 import '../parser/element_listener.dart' show 8 import '../tokens/token.dart' show BeginGroupToken, Token;
9 ElementListener; 9 import '../tokens/token_constants.dart' as Tokens show EOF_TOKEN, STRING_TOKEN;
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;
16 10
17 void checkAllowedLibrary(ElementListener listener, Token token) { 11 void checkAllowedLibrary(ElementListener listener, Token token) {
18 if (listener.scannerOptions.canUseNative) return; 12 if (listener.scannerOptions.canUseNative) return;
19 listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED); 13 listener.reportError(token, MessageKind.NATIVE_NOT_SUPPORTED);
20 } 14 }
21 15
22 Token handleNativeBlockToSkip(Listener listener, Token token) { 16 Token handleNativeBlockToSkip(Listener listener, Token token) {
23 checkAllowedLibrary(listener, token); 17 checkAllowedLibrary(listener, token);
24 token = token.next; 18 token = token.next;
25 if (identical(token.kind, Tokens.STRING_TOKEN)) { 19 if (identical(token.kind, Tokens.STRING_TOKEN)) {
(...skipping 16 matching lines...) Expand all
42 hasExpression = true; 36 hasExpression = true;
43 listener.beginLiteralString(token); 37 listener.beginLiteralString(token);
44 listener.endLiteralString(0); 38 listener.endLiteralString(0);
45 token = token.next; 39 token = token.next;
46 } 40 }
47 listener.endReturnStatement(hasExpression, begin, token); 41 listener.endReturnStatement(hasExpression, begin, token);
48 // TODO(ngeoffray): expect a ';'. 42 // TODO(ngeoffray): expect a ';'.
49 // Currently there are method with both native marker and Dart body. 43 // Currently there are method with both native marker and Dart body.
50 return token.next; 44 return token.next;
51 } 45 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/native/ssa.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698