-
Notifications
You must be signed in to change notification settings - Fork 225
/
semanticdb3.proto
274 lines (246 loc) · 4.83 KB
/
semanticdb3.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
syntax = "proto3";
package scala.meta.internal.semanticdb3;
enum Schema {
LEGACY = 0;
SEMANTICDB3 = 3;
}
message TextDocuments {
repeated TextDocument documents = 1;
}
message TextDocument {
reserved 4, 9;
Schema schema = 1;
string uri = 2;
string text = 3;
Language language = 10;
repeated SymbolInformation symbols = 5;
repeated SymbolOccurrence occurrences = 6;
repeated Diagnostic diagnostics = 7;
repeated Synthetic synthetics = 8;
}
enum Language {
UNKNOWN_LANGUAGE = 0;
SCALA = 1;
JAVA = 2;
}
message Range {
int32 start_line = 1;
int32 start_character = 2;
int32 end_line = 3;
int32 end_character = 4;
}
message Location {
string uri = 1;
Range range = 2;
}
message Type {
enum Tag {
// reserved 2, 3, 4, 5;
UNKNOWN_TYPE = 0;
TYPE_REF = 1;
SINGLETON_TYPE = 15;
INTERSECTION_TYPE = 16;
UNION_TYPE = 17;
WITH_TYPE = 18;
STRUCTURAL_TYPE = 6;
ANNOTATED_TYPE = 7;
EXISTENTIAL_TYPE = 8;
UNIVERSAL_TYPE = 9;
CLASS_INFO_TYPE = 10;
METHOD_TYPE = 11;
BY_NAME_TYPE = 12;
REPEATED_TYPE = 13;
TYPE_TYPE = 14;
}
// reserved 3, 4, 5, 6;
Tag tag = 1;
TypeRef typeRef = 2;
SingletonType singletonType = 16;
IntersectionType intersectionType = 17;
UnionType unionType = 18;
WithType withType = 19;
StructuralType structuralType = 7;
AnnotatedType annotatedType = 8;
ExistentialType existentialType = 9;
UniversalType universalType = 10;
ClassInfoType classInfoType = 11;
MethodType methodType = 12;
ByNameType byNameType = 13;
RepeatedType repeatedType = 14;
TypeType typeType = 15;
}
message TypeRef {
Type prefix = 1;
string symbol = 2;
repeated Type type_arguments = 3;
}
message SingletonType {
enum Tag {
UNKNOWN_SINGLETON = 0;
SYMBOL = 1;
THIS = 2;
SUPER = 3;
UNIT = 4;
BOOLEAN = 5;
BYTE = 6;
SHORT = 7;
CHAR = 8;
INT = 9;
LONG = 10;
FLOAT = 11;
DOUBLE = 12;
STRING = 13;
NULL = 14;
}
Tag tag = 1;
Type prefix = 2;
string symbol = 3;
int64 primitive = 4;
string string = 5;
}
message IntersectionType {
repeated Type types = 1;
}
message UnionType {
repeated Type types = 1;
}
message WithType {
repeated Type types = 1;
}
message StructuralType {
reserved 1, 2;
Type tpe = 4;
repeated string declarations = 3;
}
message AnnotatedType {
reserved 2;
repeated Annotation annotations = 3;
Type tpe = 1;
}
message ExistentialType {
repeated string type_parameters = 2;
Type tpe = 1;
}
message UniversalType {
repeated string type_parameters = 1;
Type tpe = 2;
}
message ClassInfoType {
repeated string type_parameters = 1;
repeated Type parents = 2;
repeated string declarations = 3;
}
message MethodType {
message ParameterList {
repeated string symbols = 1;
}
repeated string type_parameters = 1;
repeated ParameterList parameters = 2;
Type return_type = 3;
}
message ByNameType {
Type tpe = 1;
}
message RepeatedType {
Type tpe = 1;
}
message TypeType {
repeated string type_parameters = 1;
Type lower_bound = 2;
Type upper_bound = 3;
}
message SymbolInformation {
enum Kind {
// reserved 1, 2, 4, 5, 15, 16;
UNKNOWN_KIND = 0;
LOCAL = 19;
FIELD = 20;
METHOD = 3;
CONSTRUCTOR = 21;
MACRO = 6;
TYPE = 7;
PARAMETER = 8;
SELF_PARAMETER = 17;
TYPE_PARAMETER = 9;
OBJECT = 10;
PACKAGE = 11;
PACKAGE_OBJECT = 12;
CLASS = 13;
TRAIT = 14;
INTERFACE = 18;
}
enum Property {
UNKNOWN_PROPERTY = 0;
// reserved 0x1;
// reserved 0x2;
ABSTRACT = 0x4;
FINAL = 0x8;
SEALED = 0x10;
IMPLICIT = 0x20;
LAZY = 0x40;
CASE = 0x80;
COVARIANT = 0x100;
CONTRAVARIANT = 0x200;
VAL = 0x400;
VAR = 0x800;
STATIC = 0x1000;
PRIMARY = 0x2000;
ENUM = 0x4000;
}
reserved 2, 6, 10, 12;
string symbol = 1;
Language language = 16;
Kind kind = 3;
int32 properties = 4;
string name = 5;
TextDocument signature = 7;
repeated string members = 8;
repeated string overrides = 9;
Type tpe = 11;
repeated Annotation annotations = 13;
Accessibility accessibility = 14;
string owner = 15;
}
message Annotation {
Type tpe = 1;
}
message Accessibility {
enum Tag {
UNKNOWN_ACCESSIBILITY = 0;
PRIVATE = 1;
PRIVATE_THIS = 2;
PRIVATE_WITHIN = 3;
PROTECTED = 4;
PROTECTED_THIS = 5;
PROTECTED_WITHIN = 6;
PUBLIC = 7;
}
Tag tag = 1;
string symbol = 2;
}
message SymbolOccurrence {
enum Role {
UNKNOWN_ROLE = 0;
REFERENCE = 1;
DEFINITION = 2;
}
Range range = 1;
string symbol = 2;
Role role = 3;
}
message Diagnostic {
enum Severity {
UNKNOWN_SEVERITY = 0;
ERROR = 1;
WARNING = 2;
INFORMATION = 3;
HINT = 4;
}
Range range = 1;
Severity severity = 2;
string message = 3;
}
message Synthetic {
Range range = 1;
TextDocument text = 2;
}