authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-24 12:14:11 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-24 12:14:11 -08:00
log3706f0c2e0910395c88fc39fe2301f4fd84d5b41
treea2e2cac5edadfe46c2fa6a5fe3e579d496e87a4d
parent642f1100f24f0bbab22fa458693870e33d40a3d1

tracer added a fmt param


1 files changed, 6 insertions(+), 6 deletions(-)

src/lib.zig+6-6
...@@ -21,7 +21,7 @@ pub fn parse(comptime input: string) astgen.Value {...@@ -21,7 +21,7 @@ pub fn parse(comptime input: string) astgen.Value {
21}21}
2222
23pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype) !void {23pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype) !void {
24 const t = tracer.trace(@src());24 const t = tracer.trace(@src(), "", .{});
25 defer t.end();25 defer t.end();
2626
27 try writer.writeAll("<!DOCTYPE html>\n");27 try writer.writeAll("<!DOCTYPE html>\n");
...@@ -34,7 +34,7 @@ pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, co...@@ -34,7 +34,7 @@ pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, co
34}34}
3535
36pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, comptime opts: DoOptions, data: anytype) !void {36pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, comptime opts: DoOptions, data: anytype) !void {
37 const t = tracer.trace(@src());37 const t = tracer.trace(@src(), "", .{});
38 defer t.end();38 defer t.end();
3939
40 try do(alloc, writer, value, data, data, opts);40 try do(alloc, writer, value, data, data, opts);
...@@ -44,7 +44,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a...@@ -44,7 +44,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a
44pub const Writer = std.ArrayList(u8).Writer;44pub const Writer = std.ArrayList(u8).Writer;
4545
46fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void {46fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void {
47 const t = tracer.trace(@src());47 const t = tracer.trace(@src(), "", .{});
48 defer t.end();48 defer t.end();
4949
50 switch (comptime value) {50 switch (comptime value) {
...@@ -342,7 +342,7 @@ fn Field(comptime T: type, comptime field_name: string) type {...@@ -342,7 +342,7 @@ fn Field(comptime T: type, comptime field_name: string) type {
342}342}
343343
344pub fn writeEscaped(s: string, writer: anytype) !void {344pub fn writeEscaped(s: string, writer: anytype) !void {
345 const t = tracer.trace(@src());345 const t = tracer.trace(@src(), "", .{});
346 defer t.end();346 defer t.end();
347347
348 const view = std.unicode.Utf8View.initUnchecked(s);348 const view = std.unicode.Utf8View.initUnchecked(s);
...@@ -427,7 +427,7 @@ fn contains(haystack: []const string, needle: string) bool {...@@ -427,7 +427,7 @@ fn contains(haystack: []const string, needle: string) bool {
427}427}
428428
429fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: bool) anyerror!void {429fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: bool) anyerror!void {
430 const t = tracer.trace(@src());430 const t = tracer.trace(@src(), "", .{});
431 defer t.end();431 defer t.end();
432432
433 if (flag2) {433 if (flag2) {
...@@ -438,7 +438,7 @@ fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, c...@@ -438,7 +438,7 @@ fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, c
438}438}
439439
440fn docap(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: anytype) anyerror!void {440fn docap(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: anytype) anyerror!void {
441 const t = tracer.trace(@src());441 const t = tracer.trace(@src(), "", .{});
442 defer t.end();442 defer t.end();
443443
444 if (flag2) |_| {444 if (flag2) |_| {