rhea/src/main.rs

22 lines
408 B
Rust
Raw Normal View History

2023-08-30 20:15:24 -05:00
// Rhea
2023-09-14 10:35:11 -05:00
use bumpalo::Bump;
2023-08-30 20:15:24 -05:00
use logos::Logos;
2023-09-14 10:35:11 -05:00
use std::io::{stdin, Read};
use utils::default;
2023-08-31 17:50:25 -05:00
2023-09-14 10:35:11 -05:00
mod syntax;
mod utils;
2023-08-30 20:15:24 -05:00
2023-09-14 10:35:11 -05:00
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut buf = default();
stdin().read_to_string(&mut buf)?;
2023-08-30 20:15:24 -05:00
2023-09-14 10:35:11 -05:00
let lexer = syntax::token::Token::lexer_with_extras(&buf, default());
let arena = Bump::new();
syntax::parser::parse_lexer(lexer, &arena);
2023-08-30 20:15:24 -05:00
2023-09-14 10:35:11 -05:00
Ok(())
2023-08-30 20:15:24 -05:00
}