forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gno.proto
603 lines (506 loc) · 10.4 KB
/
gno.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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
syntax = "proto3";
package gno;
option go_package = "github.com/gnolang/gno/pb";
// imports
import "google/protobuf/any.proto";
// messages
message TypedValue {
google.protobuf.Any T = 1;
google.protobuf.Any V = 2;
bytes N = 3;
}
message StringValue {
string Value = 1;
}
message BigintValue {
string Value = 1;
}
message BigdecValue {
string Value = 1;
}
message PointerValue {
TypedValue TV = 1;
google.protobuf.Any Base = 2;
sint64 Index = 3;
TypedValue Key = 4;
}
message ArrayValue {
ObjectInfo ObjectInfo = 1;
repeated TypedValue List = 2;
bytes Data = 3;
}
message SliceValue {
google.protobuf.Any Base = 1;
sint64 Offset = 2;
sint64 Length = 3;
sint64 Maxcap = 4;
}
message StructValue {
ObjectInfo ObjectInfo = 1;
repeated TypedValue Fields = 2;
}
message FuncValue {
google.protobuf.Any Type = 1;
bool IsMethod = 2;
google.protobuf.Any Source = 3;
string Name = 4;
google.protobuf.Any Closure = 5;
string FileName = 6;
string PkgPath = 7;
}
message MapValue {
ObjectInfo ObjectInfo = 1;
MapList List = 2;
}
message MapList {
repeated MapListItem List = 1;
}
message MapListItem {
TypedValue Key = 1;
TypedValue Value = 2;
}
message BoundMethodValue {
ObjectInfo ObjectInfo = 1;
FuncValue Func = 2;
TypedValue Receiver = 3;
}
message TypeValue {
google.protobuf.Any Type = 1;
}
message PackageValue {
ObjectInfo ObjectInfo = 1;
google.protobuf.Any Block = 2;
string PkgName = 3;
string PkgPath = 4;
repeated string FNames = 5;
repeated google.protobuf.Any FBlocks = 6;
}
message Block {
ObjectInfo ObjectInfo = 1;
google.protobuf.Any Source = 2;
repeated TypedValue Values = 3;
google.protobuf.Any Parent = 4;
TypedValue Blank = 5;
}
message RefValue {
string ObjectID = 1;
bool Escaped = 2;
string PkgPath = 3;
string Hash = 4;
}
message ObjectID {
string Value = 1;
}
message ObjectInfo {
string ID = 1;
string Hash = 2;
string OwnerID = 3;
uint64 ModTime = 4;
sint64 RefCount = 5;
bool IsEscaped = 6;
}
message ValueHash {
string Value = 1;
}
message Hashlet {
bytes Value = 1;
}
message ValuePath {
uint32 Type = 1;
uint32 Depth = 2;
uint32 Index = 3;
string Name = 4;
}
message Location {
string PkgPath = 1;
string File = 2;
sint64 Line = 3;
sint64 Nonce = 4;
}
message Attributes {
sint64 Line = 1;
string Label = 2;
}
message NameExpr {
Attributes Attributes = 1;
ValuePath Path = 2;
string Name = 3;
}
message BasicLitExpr {
Attributes Attributes = 1;
sint64 Kind = 2;
string Value = 3;
}
message BinaryExpr {
Attributes Attributes = 1;
google.protobuf.Any Left = 2;
sint64 Op = 3;
google.protobuf.Any Right = 4;
}
message CallExpr {
Attributes Attributes = 1;
google.protobuf.Any Func = 2;
repeated google.protobuf.Any Args = 3;
bool Varg = 4;
sint64 NumArgs = 5;
}
message IndexExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
google.protobuf.Any Index = 3;
bool HasOK = 4;
}
message SelectorExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
ValuePath Path = 3;
string Sel = 4;
}
message SliceExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
google.protobuf.Any Low = 3;
google.protobuf.Any High = 4;
google.protobuf.Any Max = 5;
}
message StarExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
}
message RefExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
}
message TypeAssertExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
google.protobuf.Any Type = 3;
bool HasOK = 4;
}
message UnaryExpr {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
sint64 Op = 3;
}
message CompositeLitExpr {
Attributes Attributes = 1;
google.protobuf.Any Type = 2;
repeated KeyValueExpr Elts = 3;
}
message KeyValueExpr {
Attributes Attributes = 1;
google.protobuf.Any Key = 2;
google.protobuf.Any Value = 3;
}
message FuncLitExpr {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
FuncTypeExpr Type = 3;
repeated google.protobuf.Any Body = 4;
}
message ConstExpr {
Attributes Attributes = 1;
google.protobuf.Any Source = 2;
TypedValue TypedValue = 3;
}
message FieldTypeExpr {
Attributes Attributes = 1;
string Name = 2;
google.protobuf.Any Type = 3;
google.protobuf.Any Tag = 4;
}
message ArrayTypeExpr {
Attributes Attributes = 1;
google.protobuf.Any Len = 2;
google.protobuf.Any Elt = 3;
}
message SliceTypeExpr {
Attributes Attributes = 1;
google.protobuf.Any Elt = 2;
bool Vrd = 3;
}
message InterfaceTypeExpr {
Attributes Attributes = 1;
repeated FieldTypeExpr Methods = 2;
string Generic = 3;
}
message ChanTypeExpr {
Attributes Attributes = 1;
sint64 Dir = 2;
google.protobuf.Any Value = 3;
}
message FuncTypeExpr {
Attributes Attributes = 1;
repeated FieldTypeExpr Params = 2;
repeated FieldTypeExpr Results = 3;
}
message MapTypeExpr {
Attributes Attributes = 1;
google.protobuf.Any Key = 2;
google.protobuf.Any Value = 3;
}
message StructTypeExpr {
Attributes Attributes = 1;
repeated FieldTypeExpr Fields = 2;
}
message constTypeExpr {
Attributes Attributes = 1;
google.protobuf.Any Source = 2;
google.protobuf.Any Type = 3;
}
message MaybeNativeTypeExpr {
Attributes Attributes = 1;
google.protobuf.Any Type = 2;
}
message AssignStmt {
Attributes Attributes = 1;
repeated google.protobuf.Any Lhs = 2;
sint64 Op = 3;
repeated google.protobuf.Any Rhs = 4;
}
message BlockStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
repeated google.protobuf.Any Body = 3;
}
message BranchStmt {
Attributes Attributes = 1;
sint64 Op = 2;
string Label = 3;
uint32 Depth = 4;
sint64 BodyIndex = 5;
}
message DeclStmt {
Attributes Attributes = 1;
repeated google.protobuf.Any Body = 2;
}
message DeferStmt {
Attributes Attributes = 1;
CallExpr Call = 2;
}
message ExprStmt {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
}
message ForStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
google.protobuf.Any Init = 3;
google.protobuf.Any Cond = 4;
google.protobuf.Any Post = 5;
repeated google.protobuf.Any Body = 6;
}
message GoStmt {
Attributes Attributes = 1;
CallExpr Call = 2;
}
message IfStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
google.protobuf.Any Init = 3;
google.protobuf.Any Cond = 4;
IfCaseStmt Then = 5;
IfCaseStmt Else = 6;
}
message IfCaseStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
repeated google.protobuf.Any Body = 3;
}
message IncDecStmt {
Attributes Attributes = 1;
google.protobuf.Any X = 2;
sint64 Op = 3;
}
message RangeStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
google.protobuf.Any X = 3;
google.protobuf.Any Key = 4;
google.protobuf.Any Value = 5;
sint64 Op = 6;
repeated google.protobuf.Any Body = 7;
bool IsMap = 8;
bool IsString = 9;
bool IsArrayPtr = 10;
}
message ReturnStmt {
Attributes Attributes = 1;
repeated google.protobuf.Any Results = 2;
}
message PanicStmt {
Attributes Attributes = 1;
google.protobuf.Any Exception = 2;
}
message SelectStmt {
Attributes Attributes = 1;
repeated SelectCaseStmt Cases = 2;
}
message SelectCaseStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
google.protobuf.Any Comm = 3;
repeated google.protobuf.Any Body = 4;
}
message SendStmt {
Attributes Attributes = 1;
google.protobuf.Any Chan = 2;
google.protobuf.Any Value = 3;
}
message SwitchStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
google.protobuf.Any Init = 3;
google.protobuf.Any X = 4;
bool IsTypeSwitch = 5;
repeated SwitchClauseStmt Clauses = 6;
string VarName = 7;
}
message SwitchClauseStmt {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
repeated google.protobuf.Any Cases = 3;
repeated google.protobuf.Any Body = 4;
}
message EmptyStmt {
Attributes Attributes = 1;
}
message bodyStmt {
Attributes Attributes = 1;
repeated google.protobuf.Any Body = 2;
sint64 BodyLen = 3;
sint64 NextBodyIndex = 4;
sint64 NumOps = 5;
sint64 NumValues = 6;
sint64 NumExprs = 7;
sint64 NumStmts = 8;
google.protobuf.Any Cond = 9;
google.protobuf.Any Post = 10;
google.protobuf.Any Active = 11;
google.protobuf.Any Key = 12;
google.protobuf.Any Value = 13;
sint64 Op = 14;
sint64 ListLen = 15;
sint64 ListIndex = 16;
MapListItem NextItem = 17;
sint64 StrLen = 18;
sint64 StrIndex = 19;
sint32 NextRune = 20;
}
message FuncDecl {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
NameExpr NameExpr = 3;
bool IsMethod = 4;
FieldTypeExpr Recv = 5;
FuncTypeExpr Type = 6;
repeated google.protobuf.Any Body = 7;
}
message ImportDecl {
Attributes Attributes = 1;
NameExpr NameExpr = 2;
string PkgPath = 3;
}
message ValueDecl {
Attributes Attributes = 1;
repeated NameExpr NameExprs = 2;
google.protobuf.Any Type = 3;
repeated google.protobuf.Any Values = 4;
bool Const = 5;
}
message TypeDecl {
Attributes Attributes = 1;
NameExpr NameExpr = 2;
google.protobuf.Any Type = 3;
bool IsAlias = 4;
}
message StaticBlock {
Block Block = 1;
repeated google.protobuf.Any Types = 2;
uint32 NumNames = 3;
repeated string Names = 4;
repeated string Consts = 5;
repeated string Externs = 6;
Location Loc = 7;
}
message FileSet {
repeated FileNode Files = 1;
}
message FileNode {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
string Name = 3;
string PkgName = 4;
repeated google.protobuf.Any Decls = 5;
}
message PackageNode {
Attributes Attributes = 1;
StaticBlock StaticBlock = 2;
string PkgPath = 3;
string PkgName = 4;
FileSet FileSet = 5;
}
message RefNode {
Location Location = 1;
google.protobuf.Any BlockNode = 2;
}
message PrimitiveType {
sint64 Value = 1;
}
message PointerType {
google.protobuf.Any Elt = 1;
}
message ArrayType {
sint64 Len = 1;
google.protobuf.Any Elt = 2;
bool Vrd = 3;
}
message SliceType {
google.protobuf.Any Elt = 1;
bool Vrd = 2;
}
message StructType {
string PkgPath = 1;
repeated FieldType Fields = 2;
}
message FieldType {
string Name = 1;
google.protobuf.Any Type = 2;
bool Embedded = 3;
string Tag = 4;
}
message FuncType {
repeated FieldType Params = 1;
repeated FieldType Results = 2;
}
message MapType {
google.protobuf.Any Key = 1;
google.protobuf.Any Value = 2;
}
message InterfaceType {
string PkgPath = 1;
repeated FieldType Methods = 2;
string Generic = 3;
}
message TypeType {
}
message DeclaredType {
string PkgPath = 1;
string Name = 2;
google.protobuf.Any Base = 3;
repeated TypedValue Methods = 4;
}
message PackageType {
}
message ChanType {
sint64 Dir = 1;
google.protobuf.Any Elt = 2;
}
message blockType {
}
message tupleType {
repeated google.protobuf.Any Elts = 1;
}
message RefType {
string ID = 1;
}