added a create-project system to assembler, and fixed a couple of parsing bugs
This commit is contained in:
@@ -11,6 +11,8 @@ use crate::emulator::{
|
||||
ui::interface::Component,
|
||||
};
|
||||
|
||||
use assembler::prelude::*;
|
||||
|
||||
pub struct Editor {
|
||||
// editor state
|
||||
path: Option<PathBuf>,
|
||||
@@ -344,10 +346,10 @@ impl Editor {
|
||||
// builds the current file
|
||||
if ui.button("Build").clicked() && !self.unsaved {
|
||||
if let Some(path) = &self.path {
|
||||
let instructions = match assembler::assemble(path) {
|
||||
let instructions = match assemble(path) {
|
||||
Ok(instructions) => instructions,
|
||||
Err(error) => {
|
||||
self.error = Some(error.to_string());
|
||||
self.error = Some(format!("Failed to assemble: {error:?}"));
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user