pub enum AstError {
Empty,
NoEof,
UnexpectedToken {
token: Token,
additional: Option<Cow<'static, str>>,
},
}
Expand description
An error that occurs when creating the ast after tokenizing
Variants
Empty
There were no tokens passed, which shouldn’t happen normally
NoEof
Tokens passed had no end of file token, which shouldn’t happen normally
UnexpectedToken
Fields
token: Token
The token that caused the error
An unexpected token, the most likely scenario when getting an AstError
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for AstError
impl UnwindSafe for AstError
Blanket Implementations
Mutably borrows from an owned value. Read more