mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Allow multiple cgen buffers.
This commit is contained in:
1 parent
f839603198
commit
c7fe1fd8c1
4 files changed
+583
-557
No files matched your search
@@ -115,8 +115,8 @@ func genTemplates(out *bytes.Buffer) error {
|
||||
}
|
||||
}
|
||||
fmt.Fprintf(out, "}\n\n")
|
||||
fmt.Fprintf(out, "func template_%s(g *gen, args template_args_%s) error {\n", t.name, t.name)
|
||||
fmt.Fprintf(out, "g.printf(%q,\n", t.format)
|
||||
fmt.Fprintf(out, "func template_%s(b *buffer, args template_args_%s) error {\n", t.name, t.name)
|
||||
fmt.Fprintf(out, "b.printf(%q,\n", t.format)
|
||||
for _, a := range t.formatArgs {
|
||||
fmt.Fprintf(out, "args.%s,\n", stripq(a))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user