...

Text file src/cuelang.org/go/cue/format/testdata/simplify.input

Documentation: cuelang.org/go/cue/format/testdata

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

View as plain text