forked from MightyPork/crsn
mouse and key input, handle close btn, mouse demo
This commit is contained in:
@@ -73,7 +73,7 @@ impl Flatten for Vec<Box<dyn Flatten>> {
|
||||
for item in self.into_iter() {
|
||||
ops.extend(item.flatten(label_num)?);
|
||||
}
|
||||
labels_to_skips(ops)
|
||||
Ok(ops)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::asm::data::literal::RoutineName;
|
||||
|
||||
pub mod op;
|
||||
pub mod cond;
|
||||
mod flatten;
|
||||
pub mod flatten;
|
||||
|
||||
/// A higher-level instruction
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -4,6 +4,7 @@ use std::sync::Arc;
|
||||
use crate::asm::parse::{ParserContext, ParserState};
|
||||
use crate::module::CrsnExtension;
|
||||
use crate::runtime::program::Program;
|
||||
use crate::asm::instr::flatten::labels_to_skips;
|
||||
|
||||
pub mod data;
|
||||
pub mod error;
|
||||
@@ -23,6 +24,7 @@ pub fn assemble(source: &str, parsers: Arc<Vec<Box<dyn CrsnExtension>>>) -> Resu
|
||||
};
|
||||
|
||||
let ops = parse::parse(source, &pcx)?;
|
||||
let ops = labels_to_skips(ops)?;
|
||||
|
||||
Ok(Program::new(ops, parsers)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user