mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
chore: add ModuleEntry.ast
This commit is contained in:
parent
38f44e8d31
commit
31246138b3
10 changed files with 99 additions and 17 deletions
|
@ -4966,7 +4966,7 @@ impl Module {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AST {
|
||||
pub name: Str,
|
||||
pub module: Module,
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue