-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.ron
More file actions
32 lines (30 loc) · 1 KB
/
example.ron
File metadata and controls
32 lines (30 loc) · 1 KB
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
// RON supports comments
/* even multiline comments */
/* even /* embedded /* multiline */ comments */ /* */ */
TopLevelRecord (
field: Compound ("this", "is", "a", "compound", 123),
all_datatypes: (
int: 1_337_322_228,
float: 2.718281828,
char: 'ы',
string: "hello string\n",
raw_string: r##"raw "string", still unicode"##,
list: ["homogenous", "elements"],
map: {
"value": "as keys",
"also": "homogenous",
},
tuple: SomeTuple(0, OtherTuple("with", "stuff")),
record: SomeRecord (
like: "this one you're looking at",
not_homogenous: 2022,
),
unit_values: [
(), // regular unit
NamedUnit,
NamedUnitWithBraces(),
]
),
// this for simple types
simple: Newtype ( ( of: ["a list for example"] ) )
)