aboutsummaryrefslogtreecommitdiff
path: root/lib/std/zon/parse.zig
AgeCommit message (Collapse)Author
2025-09-20coerce vectors to arrays rather than inline forAndrew Kelley
2025-09-20std.zon.parse: fix not initializing array sentinelAndrew Kelley
2025-09-20compiler: require comptime vector indexesAndrew Kelley
2025-08-25Adds non allocating alternatives to ZON parse functions (#22916)Mason Remaley
* Adds "flat" alternatives to zon.parse.from* that don't support pointers * Fixes documentation * Removes flat postfix from non allocating functions, adds alloc to others * Stops using alloc variant in tests where not needed
2025-07-31std: stop relying on precision-losing coercionsmlugg
2025-07-19std.zon: update to new I/O APIAndrew Kelley
2025-07-16std.zig.Render: update it and referencesAndrew Kelley
2025-07-10Merge pull request #24329 from ziglang/writergateAndrew Kelley
Deprecates all existing std.io readers and writers in favor of the newly provided std.io.Reader and std.io.Writer which are non-generic and have the buffer above the vtable - in other words the buffer is in the interface, not the implementation. This means that although Reader and Writer are no longer generic, they are still transparent to optimization; all of the interface functions have a concrete hot path operating on the buffer, and only make vtable calls when the buffer is full.
2025-07-10std: Disable `std.zon parse float` on dynamic x86-linux-muslAlex Rønne Petersen
https://github.com/ziglang/zig/issues/23922#issuecomment-3054296672
2025-07-07std.fmt: fully remove format string from format methodsAndrew Kelley
Introduces `std.fmt.alt` which is a helper for calling alternate format methods besides one named "format".
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-06-15big.int: implement float conversionsJacob Young
These conversion routines accept a `round` argument to control how the result is rounded and return whether the result is exact. Most callers wanted this functionality and had hacks around it being missing. Also delete `std.math.big.rational` because it was only being used for float conversion, and using rationals for that is a lot more complex than necessary. It also required an allocator, whereas the new integer routines only need to be passed enough memory to store the result.
2025-05-28x86_64: implement integer `@reduce(.Add)`Jacob Young
2025-04-13std: eradicate u29 and embrace std.mem.AlignmentAndrew Kelley
2025-04-09std.zon.parse: Fix typo in test "std.zon parse bool"Manlio Perillo
Replace "Correct floats" with "Correct bools".
2025-04-02std.zon.parse: make `ast` and `zoir` fields of `Diagnostics` non-optionalMason Remaley
2025-04-02std.zon.parse: rename `Status` to `Diagnostics`Mason Remaley
This name is more appropriate and in line with the rest of `std`.
2025-04-02std.zon: populate `Zoir.Node.Index` values with corresponding ZOIR nodeMason Remaley
This allows using `std.zon` to parse schemas which are not directly representable in the Zig type system; for instance, `build.zig.zon`.
2025-03-07std.zig.Ast: improve type safetyTechatrix
This commits adds the following distinct integer types to std.zig.Ast: - OptionalTokenIndex - TokenOffset - OptionalTokenOffset - Node.OptionalIndex - Node.Offset - Node.OptionalOffset The `Node.Index` type has also been converted to a distinct type while `TokenIndex` remains unchanged. `Ast.Node.Data` has also been changed to a (untagged) union to provide safety checks.
2025-02-03compiler,std: implement ZON supportMason Remaley
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`.