[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2025-04-19 21:46:37 +00:00
parent 7b095823d3
commit c971ded1a9
2 changed files with 6 additions and 6 deletions

View file

@ -23,7 +23,7 @@ TAG_END = "%}" ;
COMMENT_START = "{#" ;
COMMENT_END = "#}" ;
SPECIAL_SEQUENCE = VAR_START | VAR_END | TAG_START | TAG_END
SPECIAL_SEQUENCE = VAR_START | VAR_END | TAG_START | TAG_END
| COMMENT_START | COMMENT_END ;
TEXT_CHAR = ANY_CHAR - SPECIAL_SEQUENCE ;
TEXT = { TEXT_CHAR }+ ;

View file

@ -9,16 +9,16 @@ use thiserror::Error;
pub enum TemplateError {
#[error("Lexer error: {0}")]
Lexer(String),
#[error("Parser error: {0}")]
Parser(String),
#[error("Validation error: {0}")]
Validation(#[from] AstError),
#[error("IO error: {0}")]
Io(String),
#[error("Configuration error: {0}")]
Config(String),
}
@ -50,7 +50,7 @@ impl TemplateError {
_ => None,
}
}
pub fn severity(&self) -> lsp_types::DiagnosticSeverity {
match self {
TemplateError::Lexer(_) | TemplateError::Parser(_) => {