File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use erg_common::set::Set;
7
7
use erg_common:: traits:: LimitedDisplay ;
8
8
use erg_common:: { log, Str } ;
9
9
use erg_compiler:: build_package:: { CheckStatus , PylyzerStatus } ;
10
+ use erg_compiler:: context:: ControlKind ;
10
11
use erg_compiler:: hir:: { ClassDef , Expr , HIR } ;
11
12
use erg_compiler:: module:: SharedModuleCache ;
12
13
use erg_compiler:: ty:: value:: { GenTypeObj , TypeObj } ;
@@ -182,6 +183,26 @@ impl DeclFileGenerator {
182
183
self . gen_chunk_decl ( chunk) ;
183
184
}
184
185
}
186
+ Expr :: Compound ( compound) => {
187
+ for chunk in compound. iter ( ) {
188
+ self . gen_chunk_decl ( chunk) ;
189
+ }
190
+ }
191
+ Expr :: Call ( call)
192
+ if call
193
+ . obj
194
+ . show_acc ( )
195
+ . is_some_and ( |acc| ControlKind :: try_from ( & acc[ ..] ) . is_ok ( ) ) =>
196
+ {
197
+ for arg in call. args . iter ( ) {
198
+ self . gen_chunk_decl ( arg) ;
199
+ }
200
+ }
201
+ Expr :: Lambda ( lambda) => {
202
+ for arg in lambda. body . iter ( ) {
203
+ self . gen_chunk_decl ( arg) ;
204
+ }
205
+ }
185
206
_ => { }
186
207
}
187
208
self . code . push ( '\n' ) ;
You can’t perform that action at this time.
0 commit comments