moved to workspaces
This commit is contained in:
parent
79975ffcba
commit
7c0dc98ef7
16 changed files with 91 additions and 103 deletions
8
crates/akailang/Cargo.toml
Normal file
8
crates/akailang/Cargo.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "akailang"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
akailang-parser = {path = "../akailang-parser" }
|
||||
akailang-backend = {path = "../akailang-backend"}
|
||||
26
crates/akailang/src/main.rs
Normal file
26
crates/akailang/src/main.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use akailang_parser::abstract_syntax_tree::parser::parse;
|
||||
|
||||
/*
|
||||
Simple Compiler -> 4 Stages:
|
||||
- lex
|
||||
- parse
|
||||
- type-check
|
||||
- translate to machine instructions
|
||||
*/
|
||||
|
||||
fn main() {
|
||||
let sourcecode = std::fs::read_to_string("sample.akai").unwrap();
|
||||
//println!("Token Stream:");
|
||||
//for (token, span) in token_iter.clone() {
|
||||
// println!("{:?} at {:?}", token, span);
|
||||
//}
|
||||
|
||||
println!("{:?}", sourcecode);
|
||||
|
||||
match parse(&sourcecode) {
|
||||
Ok(res) => println!("{:#?}", res),
|
||||
Err(e) => {
|
||||
panic!("{:#?}", e)
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue