Enum syntect::parsing::ParseSyntaxError
source · #[non_exhaustive]
pub enum ParseSyntaxError {
InvalidYaml(ScanError),
EmptyFile,
MissingMandatoryKey(&'static str),
RegexCompileError(String, Box<dyn Error + Send + Sync + 'static>),
InvalidScope(ParseScopeError),
BadFileRef,
MainMissing,
TypeMismatch,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidYaml(ScanError)
Invalid YAML file syntax, or at least something yaml_rust can’t handle
EmptyFile
The file must contain at least one YAML document
MissingMandatoryKey(&'static str)
Some keys are required for something to be a valid .sublime-syntax
RegexCompileError(String, Box<dyn Error + Send + Sync + 'static>)
Invalid regex
InvalidScope(ParseScopeError)
A scope that syntect’s scope implementation can’t handle
BadFileRef
A reference to another file that is invalid
MainMissing
Syntaxes must have a context named “main”
TypeMismatch
Some part of the YAML file is the wrong type (e.g a string but should be a list) Sorry this doesn’t give you any way to narrow down where this is. Maybe use Sublime Text to figure it out.
Trait Implementations§
source§impl Debug for ParseSyntaxError
impl Debug for ParseSyntaxError
source§impl Display for ParseSyntaxError
impl Display for ParseSyntaxError
source§impl Error for ParseSyntaxError
impl Error for ParseSyntaxError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()