def process(self) -> None: """Type check file and advance to the next state.""" if self.manager.target >= TYPE_CHECK: self.type_checker().visit_file(self.tree, self.tree.path) if DUMP_INFER_STATS in self.manager.flags: stats.dump_type_stats(self.tree, self.tree.path, inferred=True, typemap=self.manager.type_checker.type_map) self.manager.reports.file(self.tree, type_map=self.manager.type_checker.type_map) # FIX remove from active state list to speed up processing self.switch_state(TypeCheckedFile(self.info(), self.tree))
def process(self) -> None: """Type check file and advance to the next state.""" if self.manager.target >= TYPE_CHECK: self.type_checker().visit_file(self.tree, self.tree.path) if 'dump-infer-stats' in self.manager.flags: stats.dump_type_stats(self.tree, self.tree.path, inferred=True, typemap=self.manager.type_checker.type_map) elif 'html-report' in self.manager.flags: stats.generate_html_report( self.tree, self.tree.path, type_map=self.manager.type_checker.type_map, output_dir=self.manager.html_report_dir) # FIX remove from active state list to speed up processing self.switch_state(TypeCheckedFile(self.info(), self.tree))
def process(self) -> None: """Perform final pass of semantic analysis and advance state.""" self.semantic_analyzer_pass3().visit_file(self.tree, self.tree.path) if DUMP_TYPE_STATS in self.manager.flags: stats.dump_type_stats(self.tree, self.tree.path) self.switch_state(SemanticallyAnalyzedFile(self.info(), self.tree))