Enum muse_lang::compiler::syntax::ParseError
source · pub enum ParseError {
Show 27 variants
UnexpectedEof,
ExpectedEof,
MissingEnd(Paired),
MissingEndOr(Paired, char),
Token(LexerError),
UnexpectedToken,
ExpectedDeclaration,
ExpectedName,
ExpectedStructureMember,
ExpectedBlock,
ExpectedModuleBody,
ExpectedFunctionBody,
ExpectedEnumBody,
ExpectedEnumVariant,
ExpectedIn,
ExpectedFunctionParameters,
ExpectedThenOrBrace,
ExpectedColon,
ExpectedCommaOrBrace,
ExpectedMatchBody,
ExpectedPattern,
ExpectedPatternOr(Paired),
ExpectedFatArrow,
ExpectedCatchBlock,
InvalidAssignmentTarget,
InvalidLabelTarget,
InvalidMapKeyPattern,
}Expand description
A syntax parsing error.
Variants§
UnexpectedEof
An unexpected end of file.
ExpectedEof
Expected the end of a file.
MissingEnd(Paired)
Missing the end of a paired token.
MissingEndOr(Paired, char)
Missing the end of a paired token.
Token(LexerError)
An error tokenizing the source code.
UnexpectedToken
An unexpectecd token was encountered in the given context.
ExpectedDeclaration
Expected a declaration.
ExpectedName
Expected a name.
ExpectedStructureMember
Expected a structure member.
ExpectedBlock
Expected a block.
ExpectedModuleBody
Expected a module body.
ExpectedFunctionBody
Expected a function body.
ExpectedEnumBody
Expected an enum body.
ExpectedEnumVariant
Expected an enum variant.
ExpectedIn
Expected the in keyword.
ExpectedFunctionParameters
Expected function parameters.
ExpectedThenOrBrace
Expected the then keyword or a block.
ExpectedColon
Expected a :
ExpectedCommaOrBrace
Expected a , or the end }.
ExpectedMatchBody
Expected a match body.
ExpectedPattern
Expected a pattern.
ExpectedPatternOr(Paired)
Expected a pattern or the end of the pattern match grouping.
ExpectedFatArrow
Expected a =>.
ExpectedCatchBlock
Expected a catch block.
InvalidAssignmentTarget
An assignment can only be done to a lookup (a.b = c) or an index
(a[b] = c).
InvalidLabelTarget
The label specified can’t be found or belongs to an invalid target for this expression.
InvalidMapKeyPattern
Map keys must be literal values.
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ParseError
impl Debug for ParseError
source§impl<'de> Deserialize<'de> for ParseError
impl<'de> Deserialize<'de> for ParseError
source§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>,
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl ErrorKind for ParseError
impl ErrorKind for ParseError
source§impl PartialEq for ParseError
impl PartialEq for ParseError
source§impl Serialize for ParseError
impl Serialize for ParseError
impl Eq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)