aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/lexed.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-16 22:33:44 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-16 22:33:44 +0200
commit6df64050b1442a5f3a0f566cd816639ac1fd298f (patch)
tree81de54495e09c501d7d2839828523eaabb7a0569 /src/lexer/lexed.zig
parent11cc71f3b59fa62fd2fb2cb3b84e689317fb1268 (diff)
feat(dom): element generator
Diffstat (limited to 'src/lexer/lexed.zig')
-rw-r--r--src/lexer/lexed.zig49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/lexer/lexed.zig b/src/lexer/lexed.zig
deleted file mode 100644
index b7c3b2c..0000000
--- a/src/lexer/lexed.zig
+++ /dev/null
@@ -1,49 +0,0 @@
-const std = @import("std");
-const Allocator = std.mem.Allocator;
-
-pub const Kind = enum {
- literal,
- delimiter,
- title,
- quote,
- code,
- code_block,
- math,
- math_block,
- image,
- link,
- bold,
- italic,
- ref,
- callout,
- list_ordored,
- list_unordored,
- tag,
-};
-
-allocator: Allocator,
-kind: Kind,
-content: std.ArrayList(u8),
-
-const Self = @This();
-
-pub fn init(alloc: Allocator, kind: Kind, content: std.ArrayList(u8)) Self {
- return .{
- .allocator = alloc,
- .kind = kind,
- .content = content,
- };
-}
-
-pub fn deinit(self: *Self) void {
- self.content.deinit(self.allocator);
-}
-
-pub fn clone(self: *const Self, alloc: Allocator) Allocator.Error!std.ArrayList(u8) {
- return self.content.clone(alloc);
-}
-
-pub fn equals(self: *const Self, kind: Kind, content: []const u8) bool {
- if (self.kind != kind) return false;
- return std.mem.eql(u8, self.content.items, content);
-}