| 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 /// ----------------------------------------------------------------------- | 5 /// ----------------------------------------------------------------------- |
| 6 /// ERROR HANDLING | 6 /// ERROR HANDLING |
| 7 /// ----------------------------------------------------------------------- | 7 /// ----------------------------------------------------------------------- |
| 8 /// | 8 /// |
| 9 /// As a rule of thumb, errors that can be detected statically are handled by | 9 /// As a rule of thumb, errors that can be detected statically are handled by |
| 10 /// the frontend, typically by translating the erroneous code into a 'throw' or | 10 /// the frontend, typically by translating the erroneous code into a 'throw' or |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 Location _getLocationInEnclosingFile(int offset) { | 150 Location _getLocationInEnclosingFile(int offset) { |
| 151 return parent?._getLocationInEnclosingFile(offset); | 151 return parent?._getLocationInEnclosingFile(offset); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 // ------------------------------------------------------------------------ | 155 // ------------------------------------------------------------------------ |
| 156 // LIBRARIES and CLASSES | 156 // LIBRARIES and CLASSES |
| 157 // ------------------------------------------------------------------------ | 157 // ------------------------------------------------------------------------ |
| 158 | 158 |
| 159 class Library extends TreeNode implements Comparable<Library> { | 159 class Library extends TreeNode implements Comparable<Library> { |
| 160 /// An import path to this library. | 160 /// An absolute import path to this library. |
| 161 /// | 161 /// |
| 162 /// The [Uri] should have the `dart`, `package`, or `app` scheme. | 162 /// The [Uri] should have the `dart`, `package`, or `file` scheme. |
| 163 /// | |
| 164 /// If the URI has the `app` scheme, it is relative to the application root. | |
| 165 Uri importUri; | 163 Uri importUri; |
| 166 | 164 |
| 167 /// The uri of the source file this library was loaded from. | 165 /// The uri of the source file this library was loaded from. |
| 168 String fileUri; | 166 String fileUri; |
| 169 | 167 |
| 170 /// If true, the library is part of another build unit and its contents | 168 /// If true, the library is part of another build unit and its contents |
| 171 /// are only partially loaded. | 169 /// are only partially loaded. |
| 172 /// | 170 /// |
| 173 /// Classes of an external library are loaded at one of the [ClassLevel]s | 171 /// Classes of an external library are loaded at one of the [ClassLevel]s |
| 174 /// other than [ClassLevel.Body]. Members in an external library have no | 172 /// other than [ClassLevel.Body]. Members in an external library have no |
| (...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3644 | 3642 |
| 3645 @override | 3643 @override |
| 3646 defaultTreeNode(TreeNode node) { | 3644 defaultTreeNode(TreeNode node) { |
| 3647 if (node == child) { | 3645 if (node == child) { |
| 3648 return replacement; | 3646 return replacement; |
| 3649 } else { | 3647 } else { |
| 3650 return node; | 3648 return node; |
| 3651 } | 3649 } |
| 3652 } | 3650 } |
| 3653 } | 3651 } |
| OLD | NEW |