assembler: great leap forwards (more like the Cultural Revolution)

This commit is contained in:
2025-06-25 03:26:50 +01:00
parent ce76820b6d
commit 9232f2ccab
10 changed files with 172 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
//! This module contains anything within the first stage of assembly, i.e. the
//! tokenisation stage, or utility functions for reading input files.
use std::path::Path;
use crate::error::AssembleError;
pub mod source_info;
pub mod token;
pub mod tokeniser;
/// Attempts to load and open a source file, returning a [`Vec<u8>`] or an
/// [`AssembleError`].
pub fn load_source_bytes<P: AsRef<Path>>(p: P) -> Result<Vec<u8>, AssembleError> {
let path = p.as_ref();
let bytes = std::fs::read(path)?;
Ok(vec![])
}