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