| ... | @@ -147,14 +147,9 @@ fn do(alloc: *std.mem.Allocator, writer: anytype, comptime value: astgen.Value, | ... | @@ -147,14 +147,9 @@ fn do(alloc: *std.mem.Allocator, writer: anytype, comptime value: astgen.Value, |
| 147 | const field_name = comptime std.fmt.comptimePrint("{d}", .{i + 1}); | 147 | const field_name = comptime std.fmt.comptimePrint("{d}", .{i + 1}); |
| 148 | @field(args, field_name) = if (comptime std.mem.eql(u8, arg[0], "this")) search(arg[1..], data) else search(arg, ctx); | 148 | @field(args, field_name) = if (comptime std.mem.eql(u8, arg[0], "this")) search(arg[1..], data) else search(arg, ctx); |
| 149 | } | 149 | } |
| 150 | const s: []const u8 = try @call(.{}, func, args); | 150 | const repvalue = astgen.Value{ .replacement = &.{"this"} }; |
| 151 | for (s) |c| { | 151 | const newdata = try @call(.{}, func, args); |
| 152 | if (entityLookupBefore(&[_]u8{c})) |ent| { | 152 | try do(alloc, writer, repvalue, newdata, ctx, indent, flag1); |
| 153 | try writer.writeAll(ent.entity); | | |
| 154 | } else { | | |
| 155 | try writer.writeAll(&[_]u8{c}); | | |
| 156 | } | | |
| 157 | } | | |
| 158 | return; | 153 | return; |
| 159 | } | 154 | } |
| 160 | @compileError("pek: unknown custom function: " ++ v.name); | 155 | @compileError("pek: unknown custom function: " ++ v.name); |