mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix(els): local variables completion bug
This commit is contained in:
parent
dd1705bba5
commit
32eb893d9d
4 changed files with 24 additions and 15 deletions
|
@ -61,15 +61,15 @@ impl ASTBuilder {
|
|||
let module = self.runner.parse(src)?;
|
||||
let mut desugarer = Desugarer::new();
|
||||
let module = desugarer.desugar(module);
|
||||
let path = self.runner.cfg().input.full_path();
|
||||
let ast = AST::new(Str::rc(path.to_str().unwrap()), module);
|
||||
let name = self.runner.cfg().input.unescaped_filename();
|
||||
let ast = AST::new(Str::rc(name), module);
|
||||
Ok(ast)
|
||||
}
|
||||
|
||||
pub fn build_without_desugaring(&mut self, src: String) -> Result<AST, ParserRunnerErrors> {
|
||||
let module = self.runner.parse(src)?;
|
||||
let path = self.runner.cfg().input.full_path();
|
||||
let ast = AST::new(Str::rc(path.to_str().unwrap()), module);
|
||||
let name = self.runner.cfg().input.unescaped_filename();
|
||||
let ast = AST::new(Str::rc(name), module);
|
||||
Ok(ast)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue