update: cleanup
This commit is contained in:
parent
1ab6291116
commit
745b2b29ca
1 changed files with 0 additions and 13 deletions
|
|
@ -65,25 +65,12 @@ pub const Renderer = struct {
|
|||
const base_template = try self.readTemplateFile(ext.tag.?.body.extends.parent_name);
|
||||
defer self.allocator.free(base_template);
|
||||
|
||||
std.debug.print("template_path: {s}\n", .{ext.tag.?.body.extends.parent_name});
|
||||
var base_parser = parser.Parser.init(base_template);
|
||||
const base_nodes = try base_parser.parse(alloc);
|
||||
defer {
|
||||
for (base_nodes) |n| n.deinit(alloc);
|
||||
alloc.free(base_nodes);
|
||||
}
|
||||
// std.debug.print("base_nodes: {any}\n", .{base_nodes});
|
||||
for (nodes) |node| {
|
||||
if (node.type == .tag) {
|
||||
std.debug.print("tag: {any}\n", .{node.tag.?.kind});
|
||||
}
|
||||
if (node.type == .text) {
|
||||
std.debug.print("text: {s}\n", .{node.text.?.content});
|
||||
}
|
||||
if (node.type == .variable) {
|
||||
std.debug.print("variable: {s}\n", .{node.variable.?.expr});
|
||||
}
|
||||
}
|
||||
try self.renderWithInheritance(alloc, base_nodes, nodes, writer);
|
||||
} else {
|
||||
for (nodes) |node| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue