...
1// Package line 1 group 1
2// Package line 2 group 1
3
4// Package line 1 - group 2
5// Package line 2 - group 2
6package comments
7
8// Emit line 1 group 1
9
10// Emit line 1 group 2
11// Emit line 2 group 2
12{
13 // Inside Emit
14}
15
16a: 3 // a line comment
17
18b: 4 // line comment that is last in the file.
19cc: 555 // align comments
20
21// don't simplify
22a: {
23 b: 2
24}
25
26// simplify
27a: {
28 b: c: {
29 d: 1
30 }
31}
32
33// unchanged
34a: b: [1]
35
36// don't simplify
37a: b: {
38 c: 2
39}
40
41// rewrite okay
42a: b: c: {
43 d: 2
44}
45
46m: {
47}
48m: {
49 // empty with comment
50}
51
52// Issue #478
53struct1: {
54 // This is a comment
55
56 // This is a comment
57
58 // Another comment
59
60 something: {
61 }
62 // extra comment
63}
64
65struct2: {
66 // This is a comment
67
68 // This is a comment
69
70 // Another comment
71 something: {
72 }
73
74 // extra comment
75}
76
77list1: [
78 // Comment1
79
80 // Comment2
81
82 // Another comment
83 {
84 },
85
86 // Comment 3
87]
88
89list2: [
90 // foo
91]
92
93list3: [
94 // foo
95
96 // bar
97]
98
99funcArg1: foo(
100 // Comment1
101
102 // Comment2
103 3
104
105 // Comment3
106)
107
108funcArg2: foo(
109 // Comment1
110
111 // Comment2
112
113 3
114 // Comment3
115)
116
117funcArg3: foo(
118 2,
119
120 // Comment1
121
122 // Comment2
123 3
124
125 // Comment3
126)
127
128// comment including some tabs
View as plain text