Enum ruxnasm::Error [−][src]
pub enum Error {}Show variants
NoMatchingClosingParenthesis { span: Range<usize>, }, NoMatchingOpeningParenthesis { span: Range<usize>, }, MacroNameExpected { span: Range<usize>, }, LabelExpected { span: Range<usize>, }, SublabelExpected { span: Range<usize>, }, SlashInLabelOrSublabel { span: Range<usize>, }, MoreThanOneSlashInIdentifier { span: Range<usize>, }, AmpersandAtTheStartOfLabel { span: Range<usize>, }, IdentifierExpected { span: Range<usize>, }, HexNumberExpected { span: Range<usize>, }, HexNumberOrCharacterExpected { span: Range<usize>, }, CharacterExpected { span: Range<usize>, }, MoreThanOneByteFound { bytes: Vec<u8>, span: Range<usize>, }, HexDigitInvalid { digit: char, number: String, span: Range<usize>, }, HexNumberUnevenLength { length: usize, number: String, span: Range<usize>, }, HexNumberTooLong { length: usize, number: String, span: Range<usize>, }, MacroCannotBeAHexNumber { number: String, span: Range<usize>, }, MacroCannotBeAnInstruction { instruction: String, span: Range<usize>, }, MacroUndefined { name: String, span: Range<usize>, }, MacroDefinedMoreThanOnce { name: String, span: Range<usize>, other_span: Range<usize>, }, LabelDefinedMoreThanOnce { name: String, span: Range<usize>, other_span: Range<usize>, }, OpeningBraceNotAfterMacroDefinition { span: Range<usize>, }, NoMatchingOpeningBrace { span: Range<usize>, }, NoMatchingClosingBrace { span: Range<usize>, }, SublabelDefinedWithoutScope { name: String, span: Range<usize>, }, NoMatchingOpeningBracket { span: Range<usize>, }, NoMatchingClosingBracket { span: Range<usize>, }, MacroError { original_error: Box<Error>, span: Range<usize>, }, SublabelReferencedWithoutScope { name: String, span: Range<usize>, }, LabelUndefined { name: String, span: Range<usize>, }, AddressNotZeroPage { address: u16, identifier: String, span: Range<usize>, }, AddressTooFar { distance: usize, identifier: String, span: Range<usize>, other_span: Range<usize>, }, BytesInZerothPage { span: Range<usize>, }, PaddedBackwards { previous_pointer: usize, desired_pointer: usize, span: Range<usize>, }, ProgramTooLong { span: Range<usize>, },
Expand description
Enum representing every error that can be reported from Ruxnasm.
Variants
This error gets reported when an opening parenthesis is not closed i.e. it has no matching closing parenthesis.
Example
(
Show fields
Show fields
This error gets reported when a label or a sublabel name contains a slash character.
Example
@label/name
Show fields
This error gets reported when an identifier contains more than one slash character.
Example
.label-name/sublabel/name
Show fields
This error gets reported when a label name in a label definition has an ampersand as the first character.
Example
@&label-name
Show fields
This error gets reported when there is no identifier after an address rune (literal zero-page address rune, literal relative address rune, literal absolute address runem, or raw address rune).
Example
.
This error gets reported when there is no hexadecimal number after an absolute or relative pad rune.
Example
|
This error gets reported when there is no character or hexadecimal number after a literal hex rune.
Example
#
This error gets reported when there is more than one byte after a character rune.
Example
'characters
Show fields
Show fields
This error gets reported when a hexadecimal number after a literal hex rune has a length of 3, i.e. it is made out of exactly 3 hexadecimal digits.
Example
#000
Show fields
This error gets reported when the hexadecimal number after a literal hex rune is longer than 4 hexadecimal digits.
Example
#fffff
Show fields
This error gets reported when the macro name after a macro definition rune is a valid hexadecimal number i.e. it contains exactly 2 or 4 valid hexadecimal digits.
Example
%01
Show fields
This error gets reported when the macro name after a macro definition rune is a valid instruction.
Example
%ADD
Show fields
This error gets reported during an attempt to expand a macro that has not been previously defined.
Example
macro
Show fields
This error gets reported when a macro with the same name is defined multiple times.
Example
%macro { ADD }
%macro { ADD }
Show fields
This error gets reported when a label with the same name is defined multiple times.
Example
@label
@label
Show fields
This error gets reported when an opening brace character is not directly preceded by a macro definition.
Example
{ ADD }
Show fields
Show fields
This error gets reported when an opening brace is not closed i.e. it has no matching closing brace.
Example
%macro {
Show fields
This error gets reported during an attempt to define a sublabel, when no previous label has been defined.
Example
&sublabel
Show fields
Show fields
This error gets reported when an opening bracket is not closed i.e. it has no matching closing bracket.
Example
[
Show fields
This error wraps an error that has been reported from a macro definition.
Example
%macro { #001 }
macro
Show fields
This error gets reported during an attempt to reference a sublabel, when no previous label has been defined.
Example
.&sublabel
Show fields
This error gets reported during an attempt to reference a label that has not been defined.
Example
.label
Show fields
This error gets reported during an attempt to reference a non-zero-page label after a literal zero-page address rune.
Example
|0100 @label
.label
Show fields
This error gets reported during an attempt to reference a label that is too far to be a relative address after a literal relative address rune.
Example
@label
|0100 ,label
Show fields
Fields of AddressTooFar
distance: usize
The distance in bytes from the literal relative address and the label definition.
identifier: String
Name of the identifier that is referenced by the literal relative address.
span: Range<usize>
Span of the literal relative address.
other_span: Range<usize>
Span of the label definition that is referenced by the literal relative address.
This error gets reported when there are bytes in the zeroth page (first 256 bytes) of the binary.
Example
#01 #02 ADD
This error gets reported during an attempt to do an absolute pad to an address before the current address pointer.
Example
#01 #02 ADD
|0000 #02 #03 ADD
Show fields
Show fields
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more