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 #library('mirrors.util'); | 5 #library('mirrors.util'); |
6 | 6 |
| 7 // TODO(rnystrom): Use "package:" URL (#4968). |
7 #import('mirrors.dart'); | 8 #import('mirrors.dart'); |
8 #import('../../../lib/compiler/implementation/util/characters.dart'); | 9 #import('../../../lib/compiler/implementation/util/characters.dart'); |
9 | 10 |
10 //------------------------------------------------------------------------------ | 11 //------------------------------------------------------------------------------ |
11 // Utility functions for using the Mirror API | 12 // Utility functions for using the Mirror API |
12 //------------------------------------------------------------------------------ | 13 //------------------------------------------------------------------------------ |
13 | 14 |
14 /** | 15 /** |
15 * Returns an iterable over the type declarations directly inheriting from | 16 * Returns an iterable over the type declarations directly inheriting from |
16 * the declaration of this type. | 17 * the declaration of this type. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 while (0 <= index && index < text.length) { | 93 while (0 <= index && index < text.length) { |
93 var charCode = text.charCodeAt(index); | 94 var charCode = text.charCodeAt(index); |
94 if (charCode == $CR || charCode == $LF) { | 95 if (charCode == $CR || charCode == $LF) { |
95 break; | 96 break; |
96 } | 97 } |
97 index--; | 98 index--; |
98 column++; | 99 column++; |
99 } | 100 } |
100 return column; | 101 return column; |
101 } | 102 } |
OLD | NEW |