mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
This commit allows using ZON (Zig Object Notation) in a few ways. * `@import` can be used to load ZON at comptime and convert it to a normal Zig value. In this case, `@import` must have a result type. * `std.zon.parse` can be used to parse ZON at runtime, akin to the parsing logic in `std.json`. * `std.zon.stringify` can be used to convert arbitrary data structures to ZON at runtime, again akin to `std.json`.
40 lines
715 B
Text
40 lines
715 B
Text
.{
|
|
10,
|
|
24,
|
|
-4,
|
|
-123,
|
|
|
|
127,
|
|
-128,
|
|
|
|
'a',
|
|
'z',
|
|
|
|
36893488147419103231,
|
|
368934_881_474191032_31,
|
|
-18446744073709551615,
|
|
-9223372036854775809,
|
|
|
|
36893488147419103231,
|
|
-36893488147419103232,
|
|
|
|
-1.0,
|
|
123.0,
|
|
|
|
0xff,
|
|
-0xff,
|
|
0o77,
|
|
-0o77,
|
|
0b11,
|
|
-0b11,
|
|
|
|
0x1ffffffffffffffff,
|
|
0x1ffffffffffffffff,
|
|
-0x1ffffffffffffffff,
|
|
0o3777777777777777777777,
|
|
0o3777777777777777777777,
|
|
-0o3777777777777777777777,
|
|
0b11111111111111111111111111111111111111111111111111111111111111111,
|
|
0b11111111111111111111111111111111111111111111111111111111111111111,
|
|
-0b11111111111111111111111111111111111111111111111111111111111111111,
|
|
}
|