Enum lucia_lang::errors::SyntaxError
source · pub enum SyntaxError {
Show 15 variants
ParseIntError(ParseIntError),
ParseFloatError(ParseFloatError),
NumberFormatError,
UnterminatedStringError,
EscapeError(EscapeError),
UnexpectToken {
token: Box<Token>,
expected: Vec<TokenType>,
},
UnexpectEOF,
ParseAssignStmtError,
ParseTryExprError,
IllegalAst,
BreakOutsideLoop,
ContinueOutsideLoop,
GlobalOutsideFunction,
ReturnOutsideFunction,
ThrowOutsideFunction,
}Expand description
Kind of SyntaxError.
Variants§
ParseIntError(ParseIntError)
ParseFloatError(ParseFloatError)
NumberFormatError
UnterminatedStringError
EscapeError(EscapeError)
UnexpectToken
UnexpectEOF
ParseAssignStmtError
ParseTryExprError
IllegalAst
BreakOutsideLoop
ContinueOutsideLoop
GlobalOutsideFunction
ReturnOutsideFunction
ThrowOutsideFunction
Trait Implementations§
source§impl Clone for SyntaxError
impl Clone for SyntaxError
source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SyntaxError
impl Debug for SyntaxError
source§impl Display for SyntaxError
impl Display for SyntaxError
source§impl Error for SyntaxError
impl Error for SyntaxError
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()
source§impl From<EscapeError> for SyntaxError
impl From<EscapeError> for SyntaxError
source§fn from(source: EscapeError) -> Self
fn from(source: EscapeError) -> Self
Converts to this type from the input type.
source§impl From<ParseFloatError> for SyntaxError
impl From<ParseFloatError> for SyntaxError
source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for SyntaxError
impl From<ParseIntError> for SyntaxError
source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
source§impl From<SyntaxError> for Error
impl From<SyntaxError> for Error
source§fn from(source: SyntaxError) -> Self
fn from(source: SyntaxError) -> Self
Converts to this type from the input type.
source§impl PartialEq<SyntaxError> for SyntaxError
impl PartialEq<SyntaxError> for SyntaxError
source§fn eq(&self, other: &SyntaxError) -> bool
fn eq(&self, other: &SyntaxError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.