Skip to content

Commit

Permalink
Update analyzer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yilin-bao authored Dec 8, 2023
1 parent 09e7a7d commit cf7e523
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)

0 comments on commit cf7e523

Please sign in to comment.