forked from alecthomas/chroma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cue.actual
56 lines (43 loc) · 1.04 KB
/
cue.actual
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
46
47
48
49
50
51
52
53
54
55
56
"this is a test"
5
false
// This is a comment
a: {
foo: string // foo is a string
[=~"^i"]: int // all other fields starting with i are integers
[=~"^b"]: bool // all other fields starting with b are booleans
[>"c"]: string // all other fields lexically after c are strings
...string // all other fields must be a string. Note: default constraints are not yet implemented.
}
x: #"""
\#(test)
"""
b: a & {
i3: 3
bar: true
other: "a string"
}
A: close({
field1: string
field2: string
})
// Verify that various field types work
_hidden: int
regular: int
$id: int
#definition: int
@protobuf(proto3)
myStruct1: {
// Struct attribute:
@jsonschema(id="https://example.org/mystruct1.json")
// Field attributes
field: string @go(Field)
attr: int @xml(,attr) @go(Attr)
}
myStruct2: {
field: string @go(Field)
attr: int @xml(a1,attr) @go(Attr)
}
Combined: myStruct1 & myStruct2
// field: string @go(Field)
// attr: int @xml(,attr) @xml(a1,attr) @go(Attr)