pub enum AstError {
Show 13 variants
Eof,
ExpectedCompCall(Lexeme),
ExpectedVariable(Lexeme),
InvalidComponent(Lexeme),
InvalidElement(Lexeme),
InvalidFunctionCall(Lexeme),
InvalidTokenInAttributes(Lexeme),
NoNameAttachedToClass(Lexeme),
NoNameAttachedToId(Lexeme),
UnclosedCloseBraces(usize),
UnclosedOpenBraces(usize),
UnexpectedEof(Lexeme),
UnexpectedToken(Lexeme),
}Expand description
Errors defining all the errors that can be encountered while parsing.
Variants§
Eof
End of File
ExpectedCompCall(Lexeme)
Expected a Component name.
ExpectedVariable(Lexeme)
Expected a Variable name.
InvalidComponent(Lexeme)
No name attached to component.
InvalidElement(Lexeme)
No name attached to element.
InvalidFunctionCall(Lexeme)
No name attached to function.
InvalidTokenInAttributes(Lexeme)
Token that isn’t (, ), =, “, ’, or a word.
NoNameAttachedToClass(Lexeme)
Having a . without anything following it up.
NoNameAttachedToId(Lexeme)
Having a # without anything following it up.
UnclosedCloseBraces(usize)
Extra } braces
UnclosedOpenBraces(usize)
Extra { braces
UnexpectedEof(Lexeme)
File ended while we tried to parse element.
UnexpectedToken(Lexeme)
Unknown token
Implementations§
Trait Implementations§
Source§impl Error for AstError
impl Error for AstError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
impl StructuralPartialEq for AstError
Auto Trait Implementations§
impl Freeze for AstError
impl RefUnwindSafe for AstError
impl Send for AstError
impl Sync for AstError
impl Unpin for AstError
impl UnwindSafe for AstError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more