Trait lc3_ensemble::parse::Parse

source ·
pub trait Parse: Sized {
    // Required method
    fn parse(parser: &mut Parser) -> Result<Self, ParseErr>;
}
Expand description

Components that can be constructed from a sequence of tokens.

Required Methods§

source

fn parse(parser: &mut Parser) -> Result<Self, ParseErr>

Attempt to convert the next sequence of tokens in the parser’s state into a component.

If parsing fails, there are no guarantees about what happens to the input, and the parser likely should not be used after an error is raised during parsing.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Parse for AsmInstr

source§

impl Parse for Directive

source§

impl Parse for StmtKind

source§

impl Parse for Stmt

source§

impl<OFF, const N: u32> Parse for PCOffset<OFF, N>
where Offset<OFF, N>: TokenParse,

source§

impl<S: TokenParse> Parse for S

source§

impl<const N: u32> Parse for ImmOrReg<N>