mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
wip
This commit is contained in:
parent
e947cd78b9
commit
98535bfbce
28 changed files with 6508 additions and 337 deletions
20
crates/test_compile/src/help_parse.rs
Normal file
20
crates/test_compile/src/help_parse.rs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue