diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-04-25 16:56:45 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-04-25 16:56:45 +0200 |
| commit | a3e7c462dadadc6986d93f6f0203ca7a02863ef8 (patch) | |
| tree | 8be2002817241138554fc3f00440cbdb9e0fa9e1 /src/parser.zig | |
| parent | 22ce4f7a80fb6692da3a675e3a652b8f305d157a (diff) | |
refactor(ast): separate ast and exec
Diffstat (limited to 'src/parser.zig')
| -rw-r--r-- | src/parser.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.zig b/src/parser.zig index dcbf236..639160b 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -2,7 +2,7 @@ const std = @import("std"); const Allocator = std.mem.Allocator; const Token = @import("lexer/Token.zig"); const Lexer = @import("lexer/Lexer.zig"); -const Element = @import("dom/Element.zig"); +const Element = @import("Element.zig"); const paragraph = @import("paragraph.zig"); const title = @import("title.zig"); const link = @import("link.zig"); @@ -46,8 +46,7 @@ fn gen(parent: Allocator, l: *Lexer) Error![]const u8 { var res = try std.ArrayList(u8).initCapacity(parent, elements.items.len); errdefer res.deinit(parent); for (elements.items) |it| { - var v = it; - try res.appendSlice(parent, try v.render(alloc)); + try res.appendSlice(parent, try it.renderHTML(alloc)); } return res.toOwnedSlice(parent); } |
