OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 * This file is an "idl" style description of the summary format. It | 6 * This file is an "idl" style description of the summary format. It |
7 * contains abstract classes which declare the interface for reading data from | 7 * contains abstract classes which declare the interface for reading data from |
8 * summaries. It is parsed and transformed into code that implements the | 8 * summaries. It is parsed and transformed into code that implements the |
9 * summary format. | 9 * summary format. |
10 * | 10 * |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 * Annotation describing information which is not part of Dart semantics; in | 51 * Annotation describing information which is not part of Dart semantics; in |
52 * other words, if this information (or any information it refers to) changes, | 52 * other words, if this information (or any information it refers to) changes, |
53 * static analysis and runtime behavior of the library are unaffected. | 53 * static analysis and runtime behavior of the library are unaffected. |
54 * | 54 * |
55 * Information that has purely local effect (in other words, it does not affect | 55 * Information that has purely local effect (in other words, it does not affect |
56 * the API of the code being analyzed) is also marked as `informative`. | 56 * the API of the code being analyzed) is also marked as `informative`. |
57 */ | 57 */ |
58 const informative = null; | 58 const informative = null; |
59 | 59 |
60 /** | 60 /** |
| 61 * Information about an analysis error in a source. |
| 62 */ |
| 63 abstract class CacheAnalysisError extends base.SummaryClass { |
| 64 /** |
| 65 * The correction to be displayed for this error, or `null` if there is no |
| 66 * correction information for this error. The correction should indicate how |
| 67 * the user can fix the error. |
| 68 */ |
| 69 @Id(4) |
| 70 String get correction; |
| 71 |
| 72 /** |
| 73 * The unique name of the error code. |
| 74 */ |
| 75 @Id(0) |
| 76 String get errorCodeUniqueName; |
| 77 |
| 78 /** |
| 79 * Length of the error range. |
| 80 */ |
| 81 @Id(2) |
| 82 int get length; |
| 83 |
| 84 /** |
| 85 * The message to be displayed for this error. The message should indicate |
| 86 * what is wrong and why it is wrong. |
| 87 */ |
| 88 @Id(3) |
| 89 String get message; |
| 90 |
| 91 /** |
| 92 * Offset of the error range relative to the beginning of the file. |
| 93 */ |
| 94 @Id(1) |
| 95 int get offset; |
| 96 } |
| 97 |
| 98 /** |
61 * Information about a source that depends only on its content. | 99 * Information about a source that depends only on its content. |
62 */ | 100 */ |
63 @TopLevel('CaSS') | 101 @TopLevel('CaSS') |
64 abstract class CacheSourceContent extends base.SummaryClass { | 102 abstract class CacheSourceContent extends base.SummaryClass { |
65 factory CacheSourceContent.fromBuffer(List<int> buffer) => | 103 factory CacheSourceContent.fromBuffer(List<int> buffer) => |
66 generated.readCacheSourceContent(buffer); | 104 generated.readCacheSourceContent(buffer); |
67 | 105 |
68 /** | 106 /** |
69 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, | 107 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, |
70 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part]. | 108 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part]. |
(...skipping 16 matching lines...) Expand all Loading... |
87 | 125 |
88 /** | 126 /** |
89 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is | 127 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is |
90 * [CacheSourceKind.part]. | 128 * [CacheSourceKind.part]. |
91 */ | 129 */ |
92 @Id(3) | 130 @Id(3) |
93 List<String> get partUris; | 131 List<String> get partUris; |
94 } | 132 } |
95 | 133 |
96 /** | 134 /** |
| 135 * Errors of a source in a library, which depends on the import/export closure |
| 136 * of the containing library and the source. |
| 137 */ |
| 138 @TopLevel('CSEL') |
| 139 abstract class CacheSourceErrorsInLibrary extends base.SummaryClass { |
| 140 factory CacheSourceErrorsInLibrary.fromBuffer(List<int> buffer) => |
| 141 generated.readCacheSourceErrorsInLibrary(buffer); |
| 142 /** |
| 143 * The list of errors in the source in the library. |
| 144 */ |
| 145 @Id(0) |
| 146 List<CacheAnalysisError> get errors; |
| 147 } |
| 148 |
| 149 /** |
97 * Kind of a source in the cache. | 150 * Kind of a source in the cache. |
98 */ | 151 */ |
99 enum CacheSourceKind { library, part } | 152 enum CacheSourceKind { library, part } |
100 | 153 |
101 /** | 154 /** |
102 * Information about an element code range. | 155 * Information about an element code range. |
103 */ | 156 */ |
104 abstract class CodeRange extends base.SummaryClass { | 157 abstract class CodeRange extends base.SummaryClass { |
105 /** | 158 /** |
106 * Length of the element code. | 159 * Length of the element code. |
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2712 */ | 2765 */ |
2713 @Id(11) | 2766 @Id(11) |
2714 int get visibleLength; | 2767 int get visibleLength; |
2715 | 2768 |
2716 /** | 2769 /** |
2717 * If a local variable, the beginning of the visible range; zero otherwise. | 2770 * If a local variable, the beginning of the visible range; zero otherwise. |
2718 */ | 2771 */ |
2719 @Id(12) | 2772 @Id(12) |
2720 int get visibleOffset; | 2773 int get visibleOffset; |
2721 } | 2774 } |
OLD | NEW |