pub enum ProgramError {
InconsistentTag {
name: SymbolName,
span: SimpleSpan,
msg: String,
},
SymbolDefinitionLoop {
symbol_names: OneOrMore<SymbolName>,
span: SimpleSpan,
},
SyntaxError {
msg: String,
span: SimpleSpan,
},
BlockTooLong(SimpleSpan, MachineLimitExceededFailure),
RcBlockTooLong(RcWordSource),
FailedToAssignIndexRegister(SimpleSpan, SymbolName),
}
Expand description
Failure to assemble a program.
This error indicates that the program we are trying to assemble is not valid. Not all of these failure cases were detected by the TX-2’s original assembler, M4.
Variants§
InconsistentTag
A tag identifier was defined in two different places (within the same scope).
SymbolDefinitionLoop
A symbol’s definition refers to the definition of the symbol itself. The Users Handbook states that M4 didn’t reject this but indicated that the output would be incorrect for this case.
SyntaxError
Indicates that the assembler could not parse the input, or that a syntactical element (such as “#”) was used in a context where it was not allowed.
BlockTooLong(SimpleSpan, MachineLimitExceededFailure)
RcBlockTooLong(RcWordSource)
As for MachineLimitExceededFailure::BlockTooLarge
, but
specifically for the RC block.
FailedToAssignIndexRegister(SimpleSpan, SymbolName)
As for MachineLimitExceededFailure::RanOutOfIndexRegisters
.
Implementations§
Source§impl ProgramError
impl ProgramError
pub(crate) fn into_assembler_failure( self, source_file_body: &Source<'_>, ) -> AssemblerFailure
Trait Implementations§
Source§impl Debug for ProgramError
impl Debug for ProgramError
Source§impl Display for ProgramError
impl Display for ProgramError
Source§impl PartialEq for ProgramError
impl PartialEq for ProgramError
impl Eq for ProgramError
impl StructuralPartialEq for ProgramError
Auto Trait Implementations§
impl Freeze for ProgramError
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnwindSafe for ProgramError
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
Mutably borrows from an owned value. Read more
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.