...
1// TODO: there are many missing comments, but these really are consequences
2// of the buggy textpbfmt library.
3
4-- foo.cue --
5a: string
6b: [...int]
7c: [...int32]
8m: [...#Msg]
9#Msg: {
10 x: string
11 y: string
12}
13-- input.textproto --
14# file comment
15
16# doc comment a
17a: "dsfadsafsaf" # line comment
18
19# floating comment a-b
20
21# doc comment b
22b: [
23 # pre-elem comment
24
25 # doc elem 0
26 123, # elem 0 line comment
27 # trailing elem 0
28
29 # inbetween comment 1
30
31 # inbetween comment 2
32
33 # doc elem 1
34 456 # elem 1 line comment
35 # trailing elem 1
36
37 # final floating 1
38
39 # final floating 2
40]
41# floating end
42
43c: 2342134 # line elem 0
44c: 2342135 # line elem 1
45# inbetween elems
46c: 2342136 # line elem 2
47# after list c
48
49# floating
50
51m {
52 x: "sdfff" # inner line comment
53 y: "q\"qq\\q\n"
54 # after last value
55} # after elem line
56 # after elem separate
57m {
58 x: " sdfff2 \321\202\320\265\321\201\321\202 "
59 y: "q\tqq<>q2&\001\377"
60} # after list line
61# after list
62
63# floating end
64
65-- out/decode --
66// file comment
67
68// doc comment a
69a: "dsfadsafsaf" // line comment
70
71// floating comment a-b
72
73// doc comment b
74b: [
75 // pre-elem comment
76 // doc elem 0
77 123, // elem 0 line comment
78
79 // trailing elem 0
80 // inbetween comment 1
81 // inbetween comment 2
82 // doc elem 1
83 456, // elem 1 line comment
84
85 // trailing elem 1
86 // final floating 1
87
88 // final floating 2
89]
90
91// floating end
92
93c: [2342134, // line elem 0
94 2342135, // line elem 1
95 // inbetween elems
96 2342136, // line elem 2
97]
98
99// after list c
100
101// floating
102
103m: [{
104 x: "sdfff" // inner line comment
105 y: "q\"qq\\q\n"
106
107 // after last value
108
109}, // after elem line
110 // after elem separate
111 {
112 x: " sdfff2 тест "
113 y: "q\tqq<>q2&\u0001�"
114 }, // after list line
115]
116
117// after list
118
119// floating end
View as plain text