diff options
Diffstat (limited to 'crates/typst-syntax')
| -rw-r--r-- | crates/typst-syntax/src/ast.rs | 2 | ||||
| -rw-r--r-- | crates/typst-syntax/src/lexer.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs index f79e6598..7b211bfc 100644 --- a/crates/typst-syntax/src/ast.rs +++ b/crates/typst-syntax/src/ast.rs @@ -778,7 +778,7 @@ node! { impl<'a> EnumItem<'a> { /// The explicit numbering, if any: `23.`. - pub fn number(self) -> Option<usize> { + pub fn number(self) -> Option<u64> { self.0.children().find_map(|node| match node.kind() { SyntaxKind::EnumMarker => node.text().trim_end_matches('.').parse().ok(), _ => Option::None, diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs index b8f2bf25..ac69eb61 100644 --- a/crates/typst-syntax/src/lexer.rs +++ b/crates/typst-syntax/src/lexer.rs @@ -480,7 +480,7 @@ impl Lexer<'_> { self.s.eat_while(char::is_ascii_digit); let read = self.s.from(start); - if self.s.eat_if('.') && self.space_or_end() && read.parse::<usize>().is_ok() { + if self.s.eat_if('.') && self.space_or_end() && read.parse::<u64>().is_ok() { return SyntaxKind::EnumMarker; } |
