pub mod asm;
pub mod diagn;
pub mod expr;
pub mod syntax;
pub mod util;
#[cfg(test)]
pub mod test;
#[cfg(any(test, target_arch="wasm32"))]
pub mod driver;
#[cfg(target_arch="wasm32")]
pub mod webasm;
pub fn assemble_str_to_binary(
src: &str)
-> (Option<Vec<u8>>, diagn::Report)
{
let virtual_filename = "str";
let mut report = diagn::Report::new();
let mut fileserver = util::FileServerMock::new();
fileserver.add(virtual_filename, src.clone());
let opts = asm::AssemblyOptions::new();
let assembly = asm::assemble(
&mut report,
&opts,
&mut fileserver,
&[virtual_filename]);
(assembly.output.map(|o| o.format_binary()), report)
}