pub enum ParserErrorKind {
Show 29 variants
InvalidPush(Opcode),
InvalidStackImmediate(Opcode),
UnexpectedType(TokenKind),
InvalidTypeAsArgumentName(TokenKind),
InvalidDefinition(TokenKind),
InvalidConstantValue(TokenKind),
InvalidConstantName,
InvalidMacroName,
InvalidTokenInMacroBody(TokenKind),
InvalidTokenInLabelDefinition(TokenKind),
InvalidSingleArg(TokenKind),
InvalidTableBodyToken(TokenKind),
InvalidConstant(TokenKind),
InvalidArgCallIdent(TokenKind),
InvalidName(TokenKind),
InvalidArgs(TokenKind),
InvalidUint256(usize),
InvalidBytes(usize),
InvalidInt(usize),
InvalidMacroArgs(TokenKind),
InvalidReturnArgs,
InvalidImportPath(String),
InvalidDecoratorFlag(String),
InvalidDecoratorFlagArg(TokenKind),
DecoratorOnNonTest(String),
DuplicateLabel(String),
DuplicateMacro(String),
InvalidTableStatement(String),
InvalidExpression(TokenKind),
}Expand description
A Type of Parser Error
Variants§
InvalidPush(Opcode)
An invalid literal was passed to a push opcode
InvalidStackImmediate(Opcode)
Missing or out-of-range stack operand for DUPN, SWAPN or EXCHANGE
UnexpectedType(TokenKind)
Unexpected type
InvalidTypeAsArgumentName(TokenKind)
Argument name is a reserved evm primitive type keyword
InvalidDefinition(TokenKind)
Invalid definition
InvalidConstantValue(TokenKind)
Invalid constant value
InvalidConstantName
Invalid constant name (reserved name)
InvalidMacroName
Invalid macro name (reserved builtin function name)
InvalidTokenInMacroBody(TokenKind)
Unexpected token in macro body
InvalidTokenInLabelDefinition(TokenKind)
Unexpected token in label definition
InvalidSingleArg(TokenKind)
Unexpected Single Arg
InvalidTableBodyToken(TokenKind)
Unexpected Table Body Token
InvalidConstant(TokenKind)
Invalid constant
InvalidArgCallIdent(TokenKind)
Unexpected Arg Call Token
InvalidName(TokenKind)
Invalid name (macro, event, function, constant)
InvalidArgs(TokenKind)
Invalid arguments
InvalidUint256(usize)
Invalid Uint256 Size
InvalidBytes(usize)
Invalid Bytes
InvalidInt(usize)
Invalid Int
InvalidMacroArgs(TokenKind)
Invalid macro call arguments
InvalidReturnArgs
Invalid return arguments
InvalidImportPath(String)
Invalid import path
InvalidDecoratorFlag(String)
Invalid decorator flag
InvalidDecoratorFlagArg(TokenKind)
Invalid decorator flag argument
DecoratorOnNonTest(String)
A decorator placed over a macro that is not a test
DuplicateLabel(String)
Duplicate label
DuplicateMacro(String)
Duplicate MACRO
InvalidTableStatement(String)
Invalid code table statement
InvalidExpression(TokenKind)
Invalid expression syntax
Trait Implementations§
Source§impl Clone for ParserErrorKind
impl Clone for ParserErrorKind
Source§impl Debug for ParserErrorKind
impl Debug for ParserErrorKind
impl Eq for ParserErrorKind
Source§impl Ord for ParserErrorKind
impl Ord for ParserErrorKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ParserErrorKind
impl PartialEq for ParserErrorKind
Source§impl PartialOrd for ParserErrorKind
impl PartialOrd for ParserErrorKind
impl StructuralPartialEq for ParserErrorKind
Auto Trait Implementations§
impl Freeze for ParserErrorKind
impl RefUnwindSafe for ParserErrorKind
impl Send for ParserErrorKind
impl Sync for ParserErrorKind
impl Unpin for ParserErrorKind
impl UnsafeUnpin for ParserErrorKind
impl UnwindSafe for ParserErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes
Size for each variant:
InvalidPush: 1 byteInvalidStackImmediate: 1 byteUnexpectedType: 47 bytesInvalidTypeAsArgumentName: 47 bytesInvalidDefinition: 47 bytesInvalidConstantValue: 47 bytesInvalidConstantName: 0 bytesInvalidMacroName: 0 bytesInvalidTokenInMacroBody: 47 bytesInvalidTokenInLabelDefinition: 47 bytesInvalidSingleArg: 47 bytesInvalidTableBodyToken: 47 bytesInvalidConstant: 47 bytesInvalidArgCallIdent: 47 bytesInvalidName: 47 bytesInvalidArgs: 47 bytesInvalidUint256: 15 bytesInvalidBytes: 15 bytesInvalidInt: 15 bytesInvalidMacroArgs: 47 bytesInvalidReturnArgs: 0 bytesInvalidImportPath: 31 bytesInvalidDecoratorFlag: 31 bytesInvalidDecoratorFlagArg: 47 bytesDecoratorOnNonTest: 31 bytesDuplicateLabel: 31 bytesDuplicateMacro: 31 bytesInvalidTableStatement: 31 bytesInvalidExpression: 47 bytes