github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/cue/format/testdata/simplify.golden (about) 1 import "time" 2 3 foo: bar: "str" 4 5 a: B: 42 6 7 "a.b": "foo-": cc_dd: x 8 9 @attr(3) 10 11 a: b: c: 3 12 13 // references to bar are all shadowed and this can be safely turned into 14 // an identifier. 15 bar: "str" 16 17 // These references would be directly referred to if turned into an identifier. 18 // The quotes should therefore not be removed. 19 "baz1": 3 20 "baz2": 3 21 "baz3": 3 // TODO: could be simplified. 22 23 // These string labels may be turned into an identifier. 24 qux: 4 25 quux: 5 26 27 // TODO(legacy): Don't simplify "hidden" fields for now. 28 "_foo": 3 29 30 // Issue #294 31 "\("x")": "x" 32 33 (x): "foo" 34 35 a :: { 36 foo: 2 37 ... 38 } 39 40 "#A": dontSimplify 41 42 x: { 43 @tag0(foo) 44 r1: baz1 45 bar: r2: bar 46 r3: bar 47 E=quux: 3 48 49 @tag1(bar) 50 r4: quux 51 [baz2="str"]: 4 52 r5: baz2 53 [baz3="bar"]: name: baz3 54 Time: time.Time 55 }