aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/Token.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-26 23:10:17 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-26 23:17:26 +0200
commitde948492e8b38a79d5db9c506c1b7b82e86c6b12 (patch)
tree122e4c004d37193c64d6b8b89d9a252f7e237cfa /src/lexer/Token.zig
parentae6ee68d6f4ef79fef609b4d09b543fc06326e95 (diff)
feat(): support code block
Diffstat (limited to 'src/lexer/Token.zig')
-rw-r--r--src/lexer/Token.zig11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lexer/Token.zig b/src/lexer/Token.zig
index bd2a07b..bd0bdc2 100644
--- a/src/lexer/Token.zig
+++ b/src/lexer/Token.zig
@@ -21,19 +21,26 @@ pub const Kind = enum {
list_unordored,
tag,
- pub fn isDelimiter(self: @This()) bool {
+ pub inline fn isDelimiter(self: @This()) bool {
return switch (self) {
.weak_delimiter, .strong_delimiter => true,
else => false,
};
}
- pub fn isPar(self: @This()) bool {
+ pub inline fn isPar(self: @This()) bool {
return switch (self) {
.literal, .link, .code, .math, .bold, .italic, .ref => true,
else => false,
};
}
+
+ pub inline fn requiresSpace(self: @This()) bool {
+ return switch (self) {
+ .title, .list_ordored, .list_unordored => true,
+ else => false,
+ };
+ }
};
kind: Kind,