36 lines
572 B
Rust
36 lines
572 B
Rust
#[path = "shared/shared.rs"]
|
|
mod util;
|
|
|
|
#[repr(C)]
|
|
struct Ast {
|
|
nodes: util::BlobVec,
|
|
}
|
|
|
|
#[repr(C)]
|
|
struct Argument {
|
|
name: *const u8,
|
|
name_len: usize,
|
|
arg_type: u8,
|
|
}
|
|
|
|
#[repr(C)]
|
|
struct AstNode {
|
|
node_type: u8,
|
|
data: usize,
|
|
}
|
|
|
|
unsafe extern "C" {
|
|
unsafe fn bump_init();
|
|
|
|
unsafe fn parse_func(ast: *mut Ast) -> u64;
|
|
unsafe fn parse_args(ast: *mut Ast) -> (*const Argument, usize);
|
|
unsafe fn tokeniser_init(path: *const i8) -> ();
|
|
}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
bump_init();
|
|
}
|
|
println!("Bump allocator initialized.");
|
|
}
|