mouse and key input, handle close btn, mouse demo

This commit is contained in:
2020-10-05 23:37:39 +02:00
parent 6eef2b7ae3
commit 583ac7bcbf
7 changed files with 341 additions and 11 deletions
+1 -1
View File
@@ -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)
}
}
+1 -1
View File
@@ -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)]
+2
View File
@@ -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)?)
}