Skip to content
New issue

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

feat: add fmtstr::quoted_contents #5928

Merged
merged 10 commits into from
Sep 4, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ fn foo(x: Field, y: u32) -> u32 {

// Given a function, wrap its parameters in a struct definition
comptime fn output_struct(f: FunctionDefinition) -> Quoted {
let fields = f.parameters().map(|param: (Quoted, Type)| {
let fields = f.parameters().map(
|param: (Quoted, Type)| {
asterite marked this conversation as resolved.
Show resolved Hide resolved
let name = param.0;
let typ = param.1;
quote { $name: $typ, }
}).join(quote {});
}
).join(quote {});

quote {
struct Foo { $fields }
Expand Down
Loading