forked from MightyPork/crsn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
591 B
31 lines
591 B
4 years ago
|
#[macro_use]
|
||
|
extern crate log;
|
||
|
|
||
|
use crsn::module::{CrsnExtension, ParseOpRes};
|
||
|
use crsn::asm::parse::arg_parser::ArgParser;
|
||
|
use crsn::asm::instr::Op;
|
||
|
use crsn::asm::error::CrsnError;
|
||
|
|
||
|
mod defs;
|
||
|
mod parse;
|
||
|
mod exec;
|
||
|
|
||
|
#[derive(Debug, Clone)]
|
||
|
pub struct ScreenOps;
|
||
|
|
||
|
impl ScreenOps {
|
||
|
pub fn new() -> Box<dyn CrsnExtension> {
|
||
|
Box::new(Self)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl CrsnExtension for ScreenOps {
|
||
|
fn name(&self) -> &'static str {
|
||
|
"screen"
|
||
|
}
|
||
|
|
||
|
fn parse_op(&self, keyword: &str, args: ArgParser) -> Result<ParseOpRes<Op>, CrsnError> {
|
||
|
parse::parse(keyword, args)
|
||
|
}
|
||
|
}
|