Started working on a holeybytes backend.
This commit is contained in:
parent
71ed4cea39
commit
e3cdfec0d9
|
@ -16,7 +16,7 @@ impl FasmCodegen {
|
|||
($exprs:expr) => {{
|
||||
self.fasm_codegen($exprs, true)
|
||||
}};
|
||||
|
||||
|
||||
(fun: $exprs:expr) => {{
|
||||
self.fasm_codegen($exprs, false)
|
||||
}};
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
pub mod holeybytes;
|
||||
pub mod fasm;
|
||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -1,3 +1,6 @@
|
|||
#![allow(warnings)]
|
||||
#![feature(unsized_locals)]
|
||||
#![feature(arc_unwrap_or_clone)]
|
||||
#![feature(associated_type_bounds)]
|
||||
pub mod lex;
|
||||
pub mod codegen;
|
||||
|
@ -16,13 +19,12 @@ macro_rules! arrow {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let parsed = "3*10+5/5%12";
|
||||
|
||||
let mut lexer = Token::lexer(parsed);
|
||||
|
||||
let mut args = std::env::args();
|
||||
let (_, parsed) = (args.next(), args.next().unwrap());
|
||||
let mut lexer = Token::lexer(parsed.as_str());
|
||||
println!("\"{}\"", parsed);
|
||||
arrow!(" ");
|
||||
println!("{:?}", lex_str(parsed));
|
||||
println!("{:?}", lex_str(parsed.as_str()));
|
||||
arrow!(" ");
|
||||
let parsed = parse_math(lexer);
|
||||
println!("{:?}", parsed);
|
||||
|
|
Loading…
Reference in a new issue