ableos_userland/programs/aidl/src/main.rs

28 lines
458 B
Rust

#![allow(non_snake_case)]
use parser::Parser;
mod ast;
mod lexer;
mod parser;
const TEST: &str = include_str!("../assets/why.idl");
fn main() {
let res = Parser::new(TEST).parse();
match res {
Ok(ast) => { dbg!(ast); }
Err(e) => println!("{}", e)
}
}
#[macro_export]
macro_rules! unwrap_match {
($x:expr, $m:pat => $a:expr) => {
match $x {
$m => $a,
_ => unreachable!()
}
};
}