We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CommandDescriptor
For example, trying to compile this program, where the command named "add" has 2 arguments first and second:
first
second
const clulz = @import("clulz.zig"); pub fn main() !void { while (context.quit == false) { _ = try clulz.promptCommand("example> ", .{}, &[_]clulz.CommandDescriptor{ .{ .command = "add", .description = "Add two numbers", .args = struct { first: u32, second: u32 }, .proc = add, }, .{ .command = "quit", .description = "Terminate the program", .args = struct {}, .proc = quit, }, }); } } fn add(args: anytype, _:anytype) void { clulz.println("{} + {} = {}", .{args.first, args.second, args.first + args.second}) catch unreachable; }
causes Zig to panic with the following output:
broken LLVM module found: Operand is null br i1 %418, label %ErrRetReturn99, <null operand!>, !dbg !19334 Operand is null br i1 %492, label %ErrRetReturn121, <null operand!>, !dbg !19334 This is a bug in the Zig compiler.thread 275681 panic: Unable to dump stack trace: debug info stripped
The text was updated successfully, but these errors were encountered:
Relates to ziglang/zig#8893
Sorry, something went wrong.
No branches or pull requests
For example, trying to compile this program, where the command named "add" has 2 arguments
first
andsecond
:causes Zig to panic with the following output:
The text was updated successfully, but these errors were encountered: