From cf7e52366f85c859ee09ba460410c45594570d23 Mon Sep 17 00:00:00 2001 From: yilin-bao <62961093+yilin-bao@users.noreply.github.com> Date: Fri, 8 Dec 2023 02:47:28 -0600 Subject: [PATCH] Update analyzer.py --- analyzer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/analyzer.py b/analyzer.py index 391b1b8..1c74088 100644 --- a/analyzer.py +++ b/analyzer.py @@ -267,8 +267,7 @@ def analyze_defined_module(self, module, var_module_layer): # [var_module_layer] is the variable-module dictionary of current layer analyzer = ModuleAstAnalyzer(var_module_layer) analyzer.visit(module_ast) - result = analyzer.module_map - print("Results:", result) + print("Results:", analyzer.module_map) return 0 # def analyze_inbuild_module(self, var_name, var_whole_name, module_name, module): @@ -390,7 +389,7 @@ def __init__(self, var_module_dict): # In [ModuleAstAnalyzer], [var_module_dict] is just the current analyzed layer self.var_module_dict:dict = var_module_dict self.module_map = [] - + self.temp_var_ids = [] self.forward_input = [] self.current_var = "" @@ -433,7 +432,7 @@ def all_Attribute(self, targets): #---------Generically find names--------- #---------------------------------------- - def find_full_name(self, node): + def find_full_name(self, node):# -> _Identifier | Any | tuple[str, _Identifier] | None: if isinstance(node, ast.Name): return node.id elif isinstance(node, ast.Attribute): @@ -505,5 +504,6 @@ def visit_Name(self, node: Name) -> Any: return 0 if node.id in self.forward_var_list: # parent_type = [str(type(p)) for p in self.parent_stack] - self.analyze_net_name(self.parent_stack, node) + # self.analyze_net_name(self.parent_stack, node) + pass self.generic_visit_with_parent_stack(node)