| ... | ... | @@ -35,9 +35,6 @@ pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, co |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, comptime opts: DoOptions, data: anytype) !void { |
| 38 | | const t = tracer.trace(@src(), "", .{}); |
| 39 | | defer t.end(); |
| 40 | | |
| 41 | 38 | try do(alloc, writer, value, data, data, opts); |
| 42 | 39 | try writer.writeAll("\n"); |
| 43 | 40 | } |
| ... | ... | @@ -45,9 +42,6 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a |
| 45 | 42 | pub const Writer = std.ArrayList(u8).Writer; |
| 46 | 43 | |
| 47 | 44 | fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void { |
| 48 | | const t = tracer.trace(@src(), "", .{}); |
| 49 | | defer t.end(); |
| 50 | | |
| 51 | 45 | switch (comptime value) { |
| 52 | 46 | .element => |v| { |
| 53 | 47 | const hastext = comptime for (v.children) |x| { |
| ... | ... | @@ -368,9 +362,6 @@ fn Field(comptime T: type, comptime field_name: string) type { |
| 368 | 362 | } |
| 369 | 363 | |
| 370 | 364 | pub fn writeEscaped(s: string, writer: anytype) !void { |
| 371 | | const t = tracer.trace(@src(), "", .{}); |
| 372 | | defer t.end(); |
| 373 | | |
| 374 | 365 | const view = std.unicode.Utf8View.initUnchecked(s); |
| 375 | 366 | var iter = view.iterator(); |
| 376 | 367 | while (nextCodepointSliceLossy(&iter)) |sl| { |
| ... | ... | @@ -455,9 +446,6 @@ fn contains(haystack: []const string, needle: string) bool { |
| 455 | 446 | } |
| 456 | 447 | |
| 457 | 448 | fn 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 { |
| 458 | | const t = tracer.trace(@src(), "", .{}); |
| 459 | | defer t.end(); |
| 460 | | |
| 461 | 449 | if (flag2) { |
| 462 | 450 | try do(alloc, writer, top, data, ctx, opts); |
| 463 | 451 | } else { |
| ... | ... | @@ -466,9 +454,6 @@ fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, c |
| 466 | 454 | } |
| 467 | 455 | |
| 468 | 456 | fn 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 { |
| 469 | | const t = tracer.trace(@src(), "", .{}); |
| 470 | | defer t.end(); |
| 471 | | |
| 472 | 457 | if (flag2) |_| { |
| 473 | 458 | try do(alloc, writer, top, data, ctx, opts); |
| 474 | 459 | } else { |