OLD | NEW |
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 part of dart_backend; | |
6 | |
7 Function get _compareNodes => | 5 Function get _compareNodes => |
8 compareBy((n) => n.getBeginToken().charOffset); | 6 compareBy((n) => n.getBeginToken().charOffset); |
9 | 7 |
10 typedef String _Renamer(Renamable renamable); | 8 typedef String _Renamer(Renamable renamable); |
11 abstract class Renamable { | 9 abstract class Renamable { |
12 const int RENAMABLE_TYPE_ELEMENT = 1; | 10 const int RENAMABLE_TYPE_ELEMENT = 1; |
13 const int RENAMABLE_TYPE_MEMBER = 2; | 11 const int RENAMABLE_TYPE_MEMBER = 2; |
14 const int RENAMABLE_TYPE_LOCAL = 3; | 12 const int RENAMABLE_TYPE_LOCAL = 3; |
15 | 13 |
16 final Set<Node> nodes; | 14 final Set<Node> nodes; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 index ~/= firstCharAlphabet.length; | 286 index ~/= firstCharAlphabet.length; |
289 int length = otherCharsAlphabet.length; | 287 int length = otherCharsAlphabet.length; |
290 while (index >= length) { | 288 while (index >= length) { |
291 resultBuilder.add(otherCharsAlphabet[index % length]); | 289 resultBuilder.add(otherCharsAlphabet[index % length]); |
292 index ~/= length; | 290 index ~/= length; |
293 } | 291 } |
294 resultBuilder.add(otherCharsAlphabet[index]); | 292 resultBuilder.add(otherCharsAlphabet[index]); |
295 return resultBuilder.toString(); | 293 return resultBuilder.toString(); |
296 } | 294 } |
297 } | 295 } |
OLD | NEW |