Commit ff79b90 1 parent 3e63625 commit ff79b90 Copy full SHA for ff79b90
File tree 1 file changed +6
-0
lines changed
compiler/noirc_driver/src
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,12 @@ pub fn check_crate(
300
300
let nodes = to_string_pretty ( & context. def_interner . nodes ) . unwrap ( ) ;
301
301
let nodes_path = context. package_build_path . join ( "hir.json" ) ;
302
302
std:: fs:: write ( nodes_path, nodes) . unwrap ( ) ;
303
+ let def_map = context. def_map ( & crate_id) . unwrap ( ) ;
304
+ let root_module = & def_map. modules ( ) [ def_map. root ( ) . 0 ] ;
305
+ let root_module_definition_names = root_module. definitions ( ) . values ( ) . keys ( ) . collect :: < Vec < _ > > ( ) ;
306
+ println ! ( "Root module definitions: {:#?}" , root_module_definition_names) ;
307
+ let root_module_sub_module_names = root_module. children . keys ( ) . collect :: < Vec < _ > > ( ) ;
308
+ println ! ( "Root module sub-modules: {:#?}" , root_module_sub_module_names) ;
303
309
304
310
if has_errors ( & errors, options. deny_warnings ) {
305
311
Err ( errors)
You can’t perform that action at this time.
0 commit comments