WIP syscalls

This commit is contained in:
2024-11-26 01:07:47 -07:00
parent 4b55aac15f
commit e32c778acb
5 changed files with 247 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
#![feature(error_generic_member_access)]
mod compiler;
mod parser;
mod tokenizer;
@@ -15,6 +16,8 @@ enum StationlangError {
#[error(transparent)]
ParserError(#[from] parser::ParseError),
#[error(transparent)]
CompileError(#[from] compiler::CompileError),
#[error(transparent)]
IoError(#[from] std::io::Error),
}
@@ -54,11 +57,10 @@ fn run_logic() -> Result<(), StationlangError> {
let mut parser = ASTParser::new(tokenizer);
let ast = parser.parse_all()?;
let compiler = compiler::Compiler::new(parser, args.stack_size);
if let Some(ast) = ast {
println!("{}", ast);
}
let output = compiler.compile()?;
println!("{}", output);
Ok(())
}