mlugg c7485d73ac
compiler: introduce ZonGen and make ast-check run it for ZON inputs
Currently, `zig ast-check` fails on ZON files, because it tries to
interpret the file as Zig source code. This commit introduces a new
verification pass, `std.zig.ZonGen`, which applies to an AST in ZON
mode.

Like `AstGen`, this pass also converts the AST into a more helpful
format. Rather than a sequence of instructions like `Zir`, the output
format of `ZonGen` is a new datastructure called `Zoir`. This type is
essentially a simpler form of AST, containing only the information
required for consumers of ZON. It is also far more compact than
`std.zig.Ast`, with the size generally being comparable to the size of
the well-formatted source file.

The emitted `Zoir` is currently not used aside from the `-t` option to
`ast-check` which causes it to be dumped to stdout. However, in future,
it can be used for comptime `@import` of ZON files, as well as for
simpler handling of files like `build.zig.zon`, and even by other parts
of the Zig Standard Library.

Resolves: #22078
2024-12-16 17:02:35 +00:00
..
2024-12-15 03:40:20 -08:00
2024-02-23 02:37:11 -07:00
2024-07-23 11:43:12 -07:00
2024-07-09 14:25:42 -07:00
2024-03-10 18:13:30 -07:00
2024-08-22 08:44:08 +02:00
2024-08-29 20:39:11 +01:00
2024-03-21 14:11:46 -07:00
2024-11-01 02:04:27 +03:30
2024-08-07 00:48:32 -07:00
2024-11-25 14:18:55 -08:00
2024-07-31 16:57:42 -07:00
2024-11-22 15:30:07 -08:00
2024-07-19 00:30:32 -07:00
2024-07-19 00:30:32 -07:00
2024-08-29 23:43:52 +01:00
2024-07-09 14:25:42 -07:00
2024-10-23 13:47:44 -07:00
2024-12-13 13:24:38 +01:00
2024-06-17 16:12:19 -04:00