mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-12-23 08:47:53 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7b095823d3
commit
c971ded1a9
2 changed files with 6 additions and 6 deletions
|
|
@ -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 }+ ;
|
||||
|
|
|
|||
|
|
@ -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(_) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue