assembler: great leap forwards (more like the Cultural Revolution)
This commit is contained in:
@@ -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![])
|
||||
}
|
||||
Reference in New Issue
Block a user