mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
Fix #370
This commit is contained in:
parent
44781cb030
commit
e246fad74d
9 changed files with 110 additions and 72 deletions
|
@ -61,13 +61,15 @@ impl ASTBuilder {
|
|||
let module = self.runner.parse(src)?;
|
||||
let mut desugarer = Desugarer::new();
|
||||
let module = desugarer.desugar(module);
|
||||
let ast = AST::new(Str::rc(self.runner.cfg().input.full_path()), module);
|
||||
let path = self.runner.cfg().input.full_path();
|
||||
let ast = AST::new(Str::rc(path.to_str().unwrap()), module);
|
||||
Ok(ast)
|
||||
}
|
||||
|
||||
pub fn build_without_desugaring(&mut self, src: String) -> Result<AST, ParserRunnerErrors> {
|
||||
let module = self.runner.parse(src)?;
|
||||
let ast = AST::new(Str::rc(self.runner.cfg().input.full_path()), module);
|
||||
let path = self.runner.cfg().input.full_path();
|
||||
let ast = AST::new(Str::rc(path.to_str().unwrap()), module);
|
||||
Ok(ast)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue