| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 String name; | 181 String name; |
| 182 final List<Class> classes; | 182 final List<Class> classes; |
| 183 final List<Procedure> procedures; | 183 final List<Procedure> procedures; |
| 184 final List<Field> fields; | 184 final List<Field> fields; |
| 185 | 185 |
| 186 Library(this.importUri, | 186 Library(this.importUri, |
| 187 {this.name, | 187 {this.name, |
| 188 this.isExternal: false, | 188 this.isExternal: false, |
| 189 List<Class> classes, | 189 List<Class> classes, |
| 190 List<Procedure> procedures, | 190 List<Procedure> procedures, |
| 191 List<Field> fields}) | 191 List<Field> fields, |
| 192 this.fileUri}) |
| 192 : this.classes = classes ?? <Class>[], | 193 : this.classes = classes ?? <Class>[], |
| 193 this.procedures = procedures ?? <Procedure>[], | 194 this.procedures = procedures ?? <Procedure>[], |
| 194 this.fields = fields ?? <Field>[] { | 195 this.fields = fields ?? <Field>[] { |
| 195 setParents(this.classes, this); | 196 setParents(this.classes, this); |
| 196 setParents(this.procedures, this); | 197 setParents(this.procedures, this); |
| 197 setParents(this.fields, this); | 198 setParents(this.fields, this); |
| 198 } | 199 } |
| 199 | 200 |
| 200 /// Returns the top-level fields and procedures defined in this library. | 201 /// Returns the top-level fields and procedures defined in this library. |
| 201 /// | 202 /// |
| (...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3668 } | 3669 } |
| 3669 } | 3670 } |
| 3670 } | 3671 } |
| 3671 | 3672 |
| 3672 class Source { | 3673 class Source { |
| 3673 final List<int> lineStarts; | 3674 final List<int> lineStarts; |
| 3674 final String source; | 3675 final String source; |
| 3675 | 3676 |
| 3676 Source(this.lineStarts, this.source); | 3677 Source(this.lineStarts, this.source); |
| 3677 } | 3678 } |
| OLD | NEW |