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
Techatrix
de9c889a0e
aro_translate_c: fix ast lowering of continue node
...
fixes #22601
2025-03-07 22:20:35 +01:00
Techatrix
e6596cbbf0
add a reference to #21690
2025-03-07 22:20:35 +01:00
Techatrix
c19f4c4402
fix ZonGen error message when encountering an array access
2025-03-07 22:20:35 +01:00
Techatrix
ad38af77fa
remove unreachable code paths from std.zig.Ast.lastToken
...
This function checks for various possibilities that are never produced
by the parser.
Given that lastToken is unsafe to call on an Ast with errors, I also
removed code paths that would be reachable on an Ast with errors.
2025-03-07 22:20:34 +01:00
Techatrix
c1c6f08296
std.Build.Step.ConfigHeader: permit inserting enum values
2025-02-19 09:34:46 +01:00
Techatrix
344db9e26b
std.Build.Step.ConfigHeader: skip trailing whitespace in autoconf header
2025-02-19 09:34:26 +01:00
Techatrix
7e548af8b1
std.Build.Step.ConfigHeader: allow using autoconf values multiple times
2025-02-19 09:34:26 +01:00
Techatrix
c390f55e72
add a standalone test for autoconf style addConfigHeader
2025-02-19 09:34:25 +01:00
Techatrix
5b6326ec65
fix slice of slice with sentinel on the lhs slice
...
example:
```zig
test {
var foo: [2:0]u8 = .{ 1, 2 };
_ = foo[0.. :1][0..2];
}
```
A `.slice_open` ast node will not have a end index nor sentinel.
2024-12-29 07:00:39 +01:00
Techatrix
5d51d4474a
fix slice of slice with sentinel but no end index
...
example:
```zig
test {
var foo = "";
_ = foo[0..][0.. :0];
}
```
A `.slice_sentinel` ast node may not have an end index.
2024-12-29 07:00:35 +01:00
Techatrix
2e40a1d22e
simplify AstGen handling of slicing syntax
2024-12-29 00:47:24 +01:00
Techatrix
cc82620b2a
fix std.zig.Ast.rootDecls on .zon mode Ast
2024-12-14 16:40:40 -05:00
Techatrix
3f7b3daaa0
AstGen: fix analysis when encountering discard of error capture
2024-12-11 18:51:10 -05:00
Techatrix
c746d7a35d
test: check output file caching of run steps with side-effects
2024-07-21 02:03:32 -07:00
Techatrix
ebd9efa850
fix fanotify_mark on 32-bit
2024-07-19 01:40:16 -07:00
Techatrix
8f7b50e2c4
json: respect duplicate_field_behavior in std.json.Value.jsonParse
2024-07-03 15:34:59 -04:00