Commit graph

6 commits

Author SHA1 Message Date
Techatrix
4129f7ff5a
std.zig.Ast: store lbrace and rbrace token in data of .error_set_decl
This makes the `.data` field the better choice over the `.main_token` for this tag.
2025-03-07 22:22:01 +01:00
Techatrix
ca6fb30e99
std.zig.Ast: improve type safety
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-03-07 22:22:01 +01:00
Techatrix
6dcd8f4f75
std.zig.Ast: add blockStatements and builtinCallParams 2025-03-07 22:20:35 +01:00
Jacob Young
879ea2710f reduce: fix compile errors
Regressed by c11b6adf13.
2024-03-24 17:29:39 +01:00
Jacob Young
c11b6adf13 Ast: fix comptime destructure
A preceding `comptime` keyword was being ignored if the first
destructure variable was an expression.
2024-03-17 15:23:16 -07:00
Andrew Kelley
dfe430e9f4 move lazily compiled source files to lib/compiler/ 2024-02-26 23:43:56 -07:00
Renamed from lib/std/zig/reduce/Walk.zig (Browse further)