Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3106)

Side by Side Diff: pkg/analyzer/lib/src/summary/idl.dart

Issue 2042883002: Add put/getSourceErrorsInLibrary to IncrementalCache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(5)
70 String get correction;
71
72 /**
73 * The name of the `ErrorCode` subclass.
74 */
75 @Id(0)
76 String get errorCodeClass;
77
78 /**
79 * The name of the error code field in the [errorCodeClass].
80 */
81 @Id(1)
82 String get errorCodeField;
83
84 /**
85 * Length of the error range.
86 */
87 @Id(3)
88 int get length;
89
90 /**
91 * The message to be displayed for this error. The message should indicate
92 * what is wrong and why it is wrong.
93 */
94 @Id(4)
95 String get message;
96
97 /**
98 * Offset of the error range relative to the beginning of the file.
99 */
100 @Id(2)
101 int get offset;
102 }
103
104 /**
61 * Information about a source that depends only on its content. 105 * Information about a source that depends only on its content.
62 */ 106 */
63 @TopLevel('CaSS') 107 @TopLevel('CaSS')
64 abstract class CacheSourceContent extends base.SummaryClass { 108 abstract class CacheSourceContent extends base.SummaryClass {
65 factory CacheSourceContent.fromBuffer(List<int> buffer) => 109 factory CacheSourceContent.fromBuffer(List<int> buffer) =>
66 generated.readCacheSourceContent(buffer); 110 generated.readCacheSourceContent(buffer);
67 111
68 /** 112 /**
69 * The list of exported URIs, e.g. `dart:core`, or `foo/bar.dart`, 113 * 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]. 114 * or `package:foo/bar.dart`. Empty if [kind] is [CacheSourceKind.part].
(...skipping 16 matching lines...) Expand all
87 131
88 /** 132 /**
89 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is 133 * The list of part URIs, e.g. `foo/bar.dart`. Empty if [kind] is
90 * [CacheSourceKind.part]. 134 * [CacheSourceKind.part].
91 */ 135 */
92 @Id(3) 136 @Id(3)
93 List<String> get partUris; 137 List<String> get partUris;
94 } 138 }
95 139
96 /** 140 /**
141 * Errors of a source in a library, which depends on the import/export closure
142 * of the containing library and the source.
143 */
144 @TopLevel('CSEL')
145 abstract class CacheSourceErrorsInLibrary extends base.SummaryClass {
146 factory CacheSourceErrorsInLibrary.fromBuffer(List<int> buffer) =>
147 generated.readCacheSourceErrorsInLibrary(buffer);
148 /**
149 * The list of errors in the source in the library.
150 */
151 @Id(0)
152 List<CacheAnalysisError> get errors;
153 }
154
155 /**
97 * Kind of a source in the cache. 156 * Kind of a source in the cache.
98 */ 157 */
99 enum CacheSourceKind { library, part } 158 enum CacheSourceKind { library, part }
100 159
101 /** 160 /**
102 * Information about an element code range. 161 * Information about an element code range.
103 */ 162 */
104 abstract class CodeRange extends base.SummaryClass { 163 abstract class CodeRange extends base.SummaryClass {
105 /** 164 /**
106 * Length of the element code. 165 * Length of the element code.
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 */ 2771 */
2713 @Id(11) 2772 @Id(11)
2714 int get visibleLength; 2773 int get visibleLength;
2715 2774
2716 /** 2775 /**
2717 * If a local variable, the beginning of the visible range; zero otherwise. 2776 * If a local variable, the beginning of the visible range; zero otherwise.
2718 */ 2777 */
2719 @Id(12) 2778 @Id(12)
2720 int get visibleOffset; 2779 int get visibleOffset;
2721 } 2780 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698