renaming, cleanup, fmt, move "extension module" traits and structs into a separate mod
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use crsn::asm::data::literal::Value;
|
||||
use crsn::asm::instr::op::{EvalRes, OpTrait};
|
||||
use crsn::asm::instr::Cond;
|
||||
use crsn::module::{EvalRes, OpTrait};
|
||||
use crsn::runtime::fault::Fault;
|
||||
use crsn::runtime::run_thread::{state::RunState, ThreadInfo};
|
||||
|
||||
use crate::defs::StackOp;
|
||||
use crsn::asm::instr::Cond;
|
||||
|
||||
struct Stacks {
|
||||
stacks: Vec<VecDeque<Value>>,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
use crsn::asm::error::Error;
|
||||
use crsn::asm::instr::op::{AsmModule, ParseOpResult};
|
||||
use crsn::asm::instr::Op;
|
||||
use crsn::asm::parse::arg_parser::ArgParser;
|
||||
use crsn::module::{AsmModule, ParseOpRes};
|
||||
|
||||
use crate::defs::StackOp;
|
||||
|
||||
@@ -24,8 +23,8 @@ impl AsmModule for StackOps {
|
||||
"stacks"
|
||||
}
|
||||
|
||||
fn parse_op(&self, keyword: &str, mut args: ArgParser) -> Result<ParseOpResult, Error> {
|
||||
Ok(ParseOpResult::Parsed(Op::Ext(Box::new(match keyword {
|
||||
fn parse_op(&self, keyword: &str, mut args: ArgParser) -> Result<ParseOpRes, Error> {
|
||||
Ok(ParseOpRes::Parsed(Op::Ext(Box::new(match keyword {
|
||||
"push" => {
|
||||
StackOp::Push {
|
||||
num: args.next_rd()?,
|
||||
@@ -41,7 +40,7 @@ impl AsmModule for StackOps {
|
||||
}
|
||||
|
||||
_other => {
|
||||
return Ok(ParseOpResult::Unknown(args));
|
||||
return Ok(ParseOpRes::Unknown(args));
|
||||
}
|
||||
}))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user