From af7e258f800d3c4175859e5604ae9dea4b950add Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:20:55 -0300 Subject: apply suggested improvements --- crates/typst-syntax/src/lexer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/typst-syntax/src/lexer.rs') diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs index 349ba9ab..596caf18 100644 --- a/crates/typst-syntax/src/lexer.rs +++ b/crates/typst-syntax/src/lexer.rs @@ -359,9 +359,10 @@ impl Lexer<'_> { if ident == "allow" { SyntaxKind::AnnotationName } else { - let error = self.error(eco_format!("invalid annotation name")); + self.error(eco_format!("invalid annotation name")); self.hint("must be 'allow'"); - error + + SyntaxKind::Error } } -- cgit v1.2.3