forked from dave/dst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
decorations-types-generated.go
659 lines (605 loc) · 12.5 KB
/
decorations-types-generated.go
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
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
package dst
// ArrayTypeDecorations holds decorations for ArrayType:
//
// type R /*Start*/ [ /*Lbrack*/ 1] /*Len*/ int /*End*/
//
type ArrayTypeDecorations struct {
NodeDecs
Lbrack Decorations
Len Decorations
}
// AssignStmtDecorations holds decorations for AssignStmt:
//
// /*Start*/
// i = /*Tok*/ 1 /*End*/
//
type AssignStmtDecorations struct {
NodeDecs
Tok Decorations
}
// BadDeclDecorations holds decorations for BadDecl:
//
type BadDeclDecorations struct {
NodeDecs
}
// BadExprDecorations holds decorations for BadExpr:
//
type BadExprDecorations struct {
NodeDecs
}
// BadStmtDecorations holds decorations for BadStmt:
//
type BadStmtDecorations struct {
NodeDecs
}
// BasicLitDecorations holds decorations for BasicLit:
//
type BasicLitDecorations struct {
NodeDecs
}
// BinaryExprDecorations holds decorations for BinaryExpr:
//
// var P = /*Start*/ 1 /*X*/ & /*Op*/ 2 /*End*/
//
type BinaryExprDecorations struct {
NodeDecs
X Decorations
Op Decorations
}
// BlockStmtDecorations holds decorations for BlockStmt:
//
// if true /*Start*/ { /*Lbrace*/
// i++
// } /*End*/
//
// func() /*Start*/ { /*Lbrace*/ i++ } /*End*/ ()
//
type BlockStmtDecorations struct {
NodeDecs
Lbrace Decorations
}
// BranchStmtDecorations holds decorations for BranchStmt:
//
// /*Start*/
// goto /*Tok*/ A /*End*/
//
type BranchStmtDecorations struct {
NodeDecs
Tok Decorations
}
// CallExprDecorations holds decorations for CallExpr:
//
// var L = /*Start*/ C /*Fun*/ ( /*Lparen*/ 0, []int{}... /*Ellipsis*/) /*End*/
//
type CallExprDecorations struct {
NodeDecs
Fun Decorations
Lparen Decorations
Ellipsis Decorations
}
// CaseClauseDecorations holds decorations for CaseClause:
//
// switch i {
// /*Start*/ case /*Case*/ 1: /*Colon*/
// i++ /*End*/
// }
//
type CaseClauseDecorations struct {
NodeDecs
Case Decorations
Colon Decorations
}
// ChanTypeDecorations holds decorations for ChanType:
//
// type W /*Start*/ chan /*Begin*/ int /*End*/
//
// type X /*Start*/ <-chan /*Begin*/ int /*End*/
//
// type Y /*Start*/ chan /*Begin*/ <- /*Arrow*/ int /*End*/
//
type ChanTypeDecorations struct {
NodeDecs
Begin Decorations
Arrow Decorations
}
// CommClauseDecorations holds decorations for CommClause:
//
// select {
// /*Start*/ case /*Case*/ a := <-c /*Comm*/ : /*Colon*/
// print(a) /*End*/
// }
//
type CommClauseDecorations struct {
NodeDecs
Case Decorations
Comm Decorations
Colon Decorations
}
// CompositeLitDecorations holds decorations for CompositeLit:
//
// var D = /*Start*/ A /*Type*/ { /*Lbrace*/ A: 0} /*End*/
//
type CompositeLitDecorations struct {
NodeDecs
Type Decorations
Lbrace Decorations
}
// DeclStmtDecorations holds decorations for DeclStmt:
//
type DeclStmtDecorations struct {
NodeDecs
}
// DeferStmtDecorations holds decorations for DeferStmt:
//
// /*Start*/
// defer /*Defer*/ func() {}() /*End*/
//
type DeferStmtDecorations struct {
NodeDecs
Defer Decorations
}
// EllipsisDecorations holds decorations for Ellipsis:
//
// func B(a /*Start*/ ... /*Ellipsis*/ int /*End*/) {}
//
type EllipsisDecorations struct {
NodeDecs
Ellipsis Decorations
}
// EmptyStmtDecorations holds decorations for EmptyStmt:
//
type EmptyStmtDecorations struct {
NodeDecs
}
// ExprStmtDecorations holds decorations for ExprStmt:
//
type ExprStmtDecorations struct {
NodeDecs
}
// FieldDecorations holds decorations for Field:
//
// type A struct {
// /*Start*/ A int /*Type*/ `a:"a"` /*End*/
// }
//
type FieldDecorations struct {
NodeDecs
Type Decorations
}
// FieldListDecorations holds decorations for FieldList:
//
// type A1 struct /*Start*/ { /*Opening*/
// a, b int
// c string
// } /*End*/
//
type FieldListDecorations struct {
NodeDecs
Opening Decorations
}
// FileDecorations holds decorations for File:
//
// /*Start*/ package /*Package*/ data /*Name*/
//
type FileDecorations struct {
NodeDecs
Package Decorations
Name Decorations
}
// ForStmtDecorations holds decorations for ForStmt:
//
// /*Start*/
// for /*For*/ {
// i++
// } /*End*/
//
// /*Start*/
// for /*For*/ i < 1 /*Cond*/ {
// i++
// } /*End*/
//
// /*Start*/
// for /*For*/ i = 0; /*Init*/ i < 10; /*Cond*/ i++ /*Post*/ {
// i++
// } /*End*/
//
type ForStmtDecorations struct {
NodeDecs
For Decorations
Init Decorations
Cond Decorations
Post Decorations
}
// FuncDeclDecorations holds decorations for FuncDecl:
//
// /*Start*/
// func /*Func*/ d /*Name*/ (d, e int) /*Params*/ {
// return
// } /*End*/
//
// /*Start*/
// func /*Func*/ TP /*Name*/ [P any] /*TypeParams*/ (a int) /*Params*/ (b P) /*Results*/ {
// return b
// } /*End*/
//
// /*Start*/
// func /*Func*/ (a *A) /*Recv*/ e /*Name*/ (d, e int) /*Params*/ {
// return
// } /*End*/
//
// /*Start*/
// func /*Func*/ (a *A) /*Recv*/ f /*Name*/ (d, e int) /*Params*/ (f, g int) /*Results*/ {
// return
// } /*End*/
//
type FuncDeclDecorations struct {
NodeDecs
Func Decorations
Recv Decorations
Name Decorations
TypeParams Decorations
Params Decorations
Results Decorations
}
// FuncLitDecorations holds decorations for FuncLit:
//
// var C = /*Start*/ func(a int, b ...int) (c int) /*Type*/ { return 0 } /*End*/
//
type FuncLitDecorations struct {
NodeDecs
Type Decorations
}
// FuncTypeDecorations holds decorations for FuncType:
//
// type T /*Start*/ func /*Func*/ (a int) /*Params*/ (b int) /*End*/
//
type FuncTypeDecorations struct {
NodeDecs
Func Decorations
TypeParams Decorations
Params Decorations
}
// GenDeclDecorations holds decorations for GenDecl:
//
// /*Start*/
// const /*Tok*/ ( /*Lparen*/
// a, b = 1, 2
// c = 3
// ) /*End*/
//
// /*Start*/
// const /*Tok*/ d = 1 /*End*/
//
type GenDeclDecorations struct {
NodeDecs
Tok Decorations
Lparen Decorations
}
// GoStmtDecorations holds decorations for GoStmt:
//
// /*Start*/
// go /*Go*/ func() {}() /*End*/
//
type GoStmtDecorations struct {
NodeDecs
Go Decorations
}
// IdentDecorations holds decorations for Ident:
//
// /*Start*/
// i /*End*/ ++
//
// /*Start*/
// fmt. /*X*/ Print /*End*/ ()
//
type IdentDecorations struct {
NodeDecs
X Decorations
}
// IfStmtDecorations holds decorations for IfStmt:
//
// /*Start*/
// if /*If*/ a := b; /*Init*/ a /*Cond*/ {
// i++
// } else /*Else*/ {
// i++
// } /*End*/
//
type IfStmtDecorations struct {
NodeDecs
If Decorations
Init Decorations
Cond Decorations
Else Decorations
}
// ImportSpecDecorations holds decorations for ImportSpec:
//
// import (
// /*Start*/ fmt /*Name*/ "fmt" /*End*/
// )
//
type ImportSpecDecorations struct {
NodeDecs
Name Decorations
}
// IncDecStmtDecorations holds decorations for IncDecStmt:
//
// /*Start*/
// i /*X*/ ++ /*End*/
//
type IncDecStmtDecorations struct {
NodeDecs
X Decorations
}
// IndexExprDecorations holds decorations for IndexExpr:
//
// var G = /*Start*/ []int{0} /*X*/ [ /*Lbrack*/ 0 /*Index*/] /*End*/
//
type IndexExprDecorations struct {
NodeDecs
X Decorations
Lbrack Decorations
Index Decorations
}
// IndexListExprDecorations holds decorations for IndexListExpr:
//
// var T4 /*Start*/ T3 /*X*/ [ /*Lbrack*/ int, string /*Indices*/] /*End*/
//
type IndexListExprDecorations struct {
NodeDecs
X Decorations
Lbrack Decorations
Indices Decorations
}
// InterfaceTypeDecorations holds decorations for InterfaceType:
//
// type U /*Start*/ interface /*Interface*/ {
// A()
// } /*End*/
//
type InterfaceTypeDecorations struct {
NodeDecs
Interface Decorations
}
// KeyValueExprDecorations holds decorations for KeyValueExpr:
//
// var Q = map[string]string{
// /*Start*/ "a" /*Key*/ : /*Colon*/ "a", /*End*/
// }
//
type KeyValueExprDecorations struct {
NodeDecs
Key Decorations
Colon Decorations
}
// LabeledStmtDecorations holds decorations for LabeledStmt:
//
// /*Start*/
// A /*Label*/ : /*Colon*/
// print("Stmt") /*End*/
//
type LabeledStmtDecorations struct {
NodeDecs
Label Decorations
Colon Decorations
}
// MapTypeDecorations holds decorations for MapType:
//
// type V /*Start*/ map[ /*Map*/ int] /*Key*/ int /*End*/
//
type MapTypeDecorations struct {
NodeDecs
Map Decorations
Key Decorations
}
// PackageDecorations holds decorations for Package:
//
type PackageDecorations struct {
NodeDecs
}
// ParenExprDecorations holds decorations for ParenExpr:
//
// var E = /*Start*/ ( /*Lparen*/ 1 + 1 /*X*/) /*End*/ / 2
//
type ParenExprDecorations struct {
NodeDecs
Lparen Decorations
X Decorations
}
// RangeStmtDecorations holds decorations for RangeStmt:
//
// /*Start*/
// for range /*Range*/ a /*X*/ {
// } /*End*/
//
// /*Start*/
// for /*For*/ k /*Key*/ := range /*Range*/ a /*X*/ {
// print(k)
// } /*End*/
//
// /*Start*/
// for /*For*/ k /*Key*/, v /*Value*/ := range /*Range*/ a /*X*/ {
// print(k, v)
// } /*End*/
//
type RangeStmtDecorations struct {
NodeDecs
For Decorations
Key Decorations
Value Decorations
Range Decorations
X Decorations
}
// ReturnStmtDecorations holds decorations for ReturnStmt:
//
// func() int {
// /*Start*/ return /*Return*/ 1 /*End*/
// }()
//
type ReturnStmtDecorations struct {
NodeDecs
Return Decorations
}
// SelectStmtDecorations holds decorations for SelectStmt:
//
// /*Start*/
// select /*Select*/ {
// } /*End*/
//
type SelectStmtDecorations struct {
NodeDecs
Select Decorations
}
// SelectorExprDecorations holds decorations for SelectorExpr:
//
// var F = /*Start*/ tt. /*X*/ F /*End*/ ()
//
type SelectorExprDecorations struct {
NodeDecs
X Decorations
}
// SendStmtDecorations holds decorations for SendStmt:
//
// /*Start*/
// c /*Chan*/ <- /*Arrow*/ 0 /*End*/
//
type SendStmtDecorations struct {
NodeDecs
Chan Decorations
Arrow Decorations
}
// SliceExprDecorations holds decorations for SliceExpr:
//
// var H = /*Start*/ []int{0, 1, 2} /*X*/ [ /*Lbrack*/ 1: /*Low*/ 2: /*High*/ 3 /*Max*/] /*End*/
//
// var H1 = /*Start*/ []int{0, 1, 2} /*X*/ [ /*Lbrack*/ 1: /*Low*/ 2 /*High*/] /*End*/
//
// var H2 = /*Start*/ []int{0} /*X*/ [: /*Low*/] /*End*/
//
// var H3 = /*Start*/ []int{0} /*X*/ [ /*Lbrack*/ 1: /*Low*/] /*End*/
//
// var H4 = /*Start*/ []int{0, 1, 2} /*X*/ [: /*Low*/ 2 /*High*/] /*End*/
//
// var H5 = /*Start*/ []int{0, 1, 2} /*X*/ [: /*Low*/ 2: /*High*/ 3 /*Max*/] /*End*/
//
type SliceExprDecorations struct {
NodeDecs
X Decorations
Lbrack Decorations
Low Decorations
High Decorations
Max Decorations
}
// StarExprDecorations holds decorations for StarExpr:
//
// var N = /*Start*/ * /*Star*/ p /*End*/
//
type StarExprDecorations struct {
NodeDecs
Star Decorations
}
// StructTypeDecorations holds decorations for StructType:
//
// type S /*Start*/ struct /*Struct*/ {
// A int
// } /*End*/
//
type StructTypeDecorations struct {
NodeDecs
Struct Decorations
}
// SwitchStmtDecorations holds decorations for SwitchStmt:
//
// /*Start*/
// switch /*Switch*/ i /*Tag*/ {
// } /*End*/
//
// /*Start*/
// switch /*Switch*/ a := i; /*Init*/ a /*Tag*/ {
// } /*End*/
//
type SwitchStmtDecorations struct {
NodeDecs
Switch Decorations
Init Decorations
Tag Decorations
}
// TypeAssertExprDecorations holds decorations for TypeAssertExpr:
//
// var J = /*Start*/ f. /*X*/ ( /*Lparen*/ int /*Type*/) /*End*/
//
type TypeAssertExprDecorations struct {
NodeDecs
X Decorations
Lparen Decorations
Type Decorations
}
// TypeSpecDecorations holds decorations for TypeSpec:
//
// type (
// /*Start*/ T1 /*Name*/ []int /*End*/
// )
//
// type (
// /*Start*/ T2 = /*Name*/ T1 /*End*/
// )
//
// type (
// /*Start*/ T3 /*Name*/ [P any, Q any] /*TypeParams*/ []P /*End*/
// )
//
type TypeSpecDecorations struct {
NodeDecs
Name Decorations
TypeParams Decorations
}
// TypeSwitchStmtDecorations holds decorations for TypeSwitchStmt:
//
// /*Start*/
// switch /*Switch*/ f.(type) /*Assign*/ {
// } /*End*/
//
// /*Start*/
// switch /*Switch*/ g := f.(type) /*Assign*/ {
// case int:
// print(g)
// } /*End*/
//
// /*Start*/
// switch /*Switch*/ g := f; /*Init*/ g := g.(type) /*Assign*/ {
// case int:
// print(g)
// } /*End*/
//
type TypeSwitchStmtDecorations struct {
NodeDecs
Switch Decorations
Init Decorations
Assign Decorations
}
// UnaryExprDecorations holds decorations for UnaryExpr:
//
// var O = /*Start*/ ^ /*Op*/ 1 /*End*/
//
type UnaryExprDecorations struct {
NodeDecs
Op Decorations
}
// ValueSpecDecorations holds decorations for ValueSpec:
//
// var (
// /*Start*/ j = /*Assign*/ 1 /*End*/
// )
//
// var (
// /*Start*/ k, l = /*Assign*/ 1, 2 /*End*/
// )
//
// var (
// /*Start*/ m, n int = /*Assign*/ 1, 2 /*End*/
// )
//
type ValueSpecDecorations struct {
NodeDecs
Assign Decorations
}