This commit is contained in:
Richard Feldman 2024-10-18 22:32:41 -04:00
parent e947cd78b9
commit 98535bfbce
No known key found for this signature in database
GPG key ID: 5DE4EE30BB738EDF
28 changed files with 6508 additions and 337 deletions

View file

@ -0,0 +1,20 @@
pub struct ParseExpr {
arena: Box<Bump>,
ast: Box<Ast>,
}
impl ParseExpr {
pub fn parse(&str) -> Self {
let mut arena = Bump::new();
let ast = parse(arena, without_indent(str));
Self {
arena,
ast,
}
}
pub fn ast(&self) -> &Ast {
self.ast
}
}