OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.kernel_builder; | 5 library fasta.kernel_builder; |
6 | 6 |
7 export 'kernel_class_builder.dart' show KernelClassBuilder; | 7 export 'kernel_class_builder.dart' show KernelClassBuilder; |
8 | 8 |
9 export 'kernel_enum_builder.dart' show KernelEnumBuilder; | 9 export 'kernel_enum_builder.dart' show KernelEnumBuilder; |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 charOffset ??= -1; | 99 charOffset ??= -1; |
100 if (charOffset == -1) { | 100 if (charOffset == -1) { |
101 charOffset = member.fileOffset ?? -1; | 101 charOffset = member.fileOffset ?? -1; |
102 } | 102 } |
103 if (charOffset == -1) { | 103 if (charOffset == -1) { |
104 charOffset = cls?.fileOffset ?? -1; | 104 charOffset = cls?.fileOffset ?? -1; |
105 } | 105 } |
106 name = (cls == null ? "" : "${cls.name}::") + name; | 106 name = (cls == null ? "" : "${cls.name}::") + name; |
107 return inputError(uri, charOffset, "Error in $name: $error"); | 107 return inputError(uri, charOffset, "Error in $name: $error"); |
108 } | 108 } |
| 109 |
| 110 int compareProcedures(Procedure a, Procedure b) { |
| 111 int i = a.fileUri.compareTo(b.fileUri); |
| 112 if (i != 0) return i; |
| 113 return a.fileOffset.compareTo(b.fileOffset); |
| 114 } |
OLD | NEW |