mirror of https://github.com/mtshiba/pylyzer
fix: decl file generation bug
This commit is contained in:
parent
1aa3f53d5d
commit
b52b017c37
|
|
@ -7,6 +7,7 @@ use erg_common::set::Set;
|
|||
use erg_common::traits::LimitedDisplay;
|
||||
use erg_common::{log, Str};
|
||||
use erg_compiler::build_package::{CheckStatus, PylyzerStatus};
|
||||
use erg_compiler::context::ControlKind;
|
||||
use erg_compiler::hir::{ClassDef, Expr, HIR};
|
||||
use erg_compiler::module::SharedModuleCache;
|
||||
use erg_compiler::ty::value::{GenTypeObj, TypeObj};
|
||||
|
|
@ -182,6 +183,26 @@ impl DeclFileGenerator {
|
|||
self.gen_chunk_decl(chunk);
|
||||
}
|
||||
}
|
||||
Expr::Compound(compound) => {
|
||||
for chunk in compound.iter() {
|
||||
self.gen_chunk_decl(chunk);
|
||||
}
|
||||
}
|
||||
Expr::Call(call)
|
||||
if call
|
||||
.obj
|
||||
.show_acc()
|
||||
.is_some_and(|acc| ControlKind::try_from(&acc[..]).is_ok()) =>
|
||||
{
|
||||
for arg in call.args.iter() {
|
||||
self.gen_chunk_decl(arg);
|
||||
}
|
||||
}
|
||||
Expr::Lambda(lambda) => {
|
||||
for arg in lambda.body.iter() {
|
||||
self.gen_chunk_decl(arg);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
self.code.push('\n');
|
||||
|
|
|
|||
Loading…
Reference in New Issue