aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/Lexed.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-18 15:35:46 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-18 15:35:46 +0200
commitc4f41ad2502567f641652eb745707d2c2817973b (patch)
treee72efc430924f05334219fc8ff690f4399d56d6c /src/lexer/Lexed.zig
parent348c06fdf2109b2953724bb50775e788fdde9356 (diff)
feat(lexer): enforce delimiter requirements
Diffstat (limited to 'src/lexer/Lexed.zig')
-rw-r--r--src/lexer/Lexed.zig11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lexer/Lexed.zig b/src/lexer/Lexed.zig
index b7c3b2c..4101953 100644
--- a/src/lexer/Lexed.zig
+++ b/src/lexer/Lexed.zig
@@ -3,7 +3,8 @@ const Allocator = std.mem.Allocator;
pub const Kind = enum {
literal,
- delimiter,
+ weak_delimiter,
+ strong_delimiter,
title,
quote,
code,
@@ -19,6 +20,14 @@ pub const Kind = enum {
list_ordored,
list_unordored,
tag,
+
+ pub fn isDelimiter(self: @This()) bool {
+ return switch (self) {
+ .weak_delimiter => true,
+ .strong_delimiter => true,
+ else => false,
+ };
+ }
};
allocator: Allocator,