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

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

Issue 1315483006: Split scannerlib.dart into several libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update try tests Created 5 years, 3 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart2js.tokens.token_map; 5 library dart2js.tokens.token_map;
6 6
7 import 'scannerlib.dart' show 7 import 'token.dart' show
8 Token; 8 Token;
9 9
10 /** 10 /**
11 * Key class used in [TokenMap] in which the hash code for a token is based 11 * Key class used in [TokenMap] in which the hash code for a token is based
12 * on the [charOffset]. 12 * on the [charOffset].
13 */ 13 */
14 class TokenKey { 14 class TokenKey {
15 final Token token; 15 final Token token;
16 TokenKey(this.token); 16 TokenKey(this.token);
17 int get hashCode => token.charOffset; 17 int get hashCode => token.charOffset;
(...skipping 20 matching lines...) Expand all
38 Token operator[] (Token key) { 38 Token operator[] (Token key) {
39 if (key == null) return null; 39 if (key == null) return null;
40 return comments[new TokenKey(key)]; 40 return comments[new TokenKey(key)];
41 } 41 }
42 42
43 void operator[]= (Token key, Token value) { 43 void operator[]= (Token key, Token value) {
44 if (key == null) return; 44 if (key == null) return;
45 comments[new TokenKey(key)] = value; 45 comments[new TokenKey(key)] = value;
46 } 46 }
47 } 47 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/scanner/token.dart ('k') | pkg/compiler/lib/src/scanner/utf8_bytes_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698