File: list.txtar

package info (click to toggle)
golang-github-cue-lang-cue 0.12.0.-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,072 kB
  • sloc: sh: 57; makefile: 17
file content (45 lines) | stat: -rw-r--r-- 720 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// test of non-standard list

// TODO: there are many missing comments, but these really are consequences
// of the buggy textpbfmt library.

-- list.cue --
empty1: [...int]
empty2: [...int]

int1: [...int]
int2: [...int]
int3: [...int]

string1: [...string]

float1: [...number]
-- input.textproto --
empty1: []
empty2: [# foo
]

int1: [1, 2]
int2: [1 2]  # omitting commas okay
int3: [
    1 # omitting comma okay
    2
]

string1: [
    "a",  # omitting comma NOT supported
    "b"
]

float1: [ 1e+2 1. 0]
-- out/decode --
empty1: []
empty2: [// foo
]
int1: [1, 2]
int2: [1, 2] // omitting commas okay
int3: [1, // omitting comma okay
		2]
string1: ["a", // omitting comma NOT supported
		"b"]
float1: [1e+2, 1.0, 0]