mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
add an ast smith
This generates zig ASTs from `testing.Smith` and is based off the langref's PEG. The choice to not build the Ast while generating and instead parsing it afterwards makes the smith more versatile by not being tied to a single implementation at a cost of efficiency. Additionally, a new function `boolWeighted` was added to `Smith` due to its frequent use in `AstSmith`.
This commit is contained in:
@@ -23,6 +23,7 @@ pub const primitives = @import("zig/primitives.zig");
|
||||
pub const isPrimitive = primitives.isPrimitive;
|
||||
pub const Ast = @import("zig/Ast.zig");
|
||||
pub const AstGen = @import("zig/AstGen.zig");
|
||||
pub const AstSmith = @import("zig/AstSmith.zig");
|
||||
pub const Zir = @import("zig/Zir.zig");
|
||||
pub const Zoir = @import("zig/Zoir.zig");
|
||||
pub const ZonGen = @import("zig/ZonGen.zig");
|
||||
@@ -1165,6 +1166,7 @@ pub const ClangCliParam = struct {
|
||||
test {
|
||||
_ = Ast;
|
||||
_ = AstRlAnnotate;
|
||||
_ = AstSmith;
|
||||
_ = BuiltinFn;
|
||||
_ = Client;
|
||||
_ = ErrorBundle;
|
||||
|
||||
Reference in New Issue
Block a user