chore: add ModuleEntry.ast

This commit is contained in:
Shunsuke Shibayama 2023-09-14 01:22:09 +09:00
parent 38f44e8d31
commit 31246138b3
10 changed files with 99 additions and 17 deletions

View file

@ -4966,7 +4966,7 @@ impl Module {
}
}
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct AST {
pub name: Str,
pub module: Module,

View file

@ -116,6 +116,12 @@ impl Parsable for SimpleParser {
}
}
impl SimpleParser {
pub fn parse(code: String) -> Result<CompleteArtifact, IncompleteArtifact> {
<Self as Parsable>::parse(code)
}
}
enum ExprOrOp {
Expr(Expr),
Op(Token),