Created by: zhhsplendid
-
Considering functions, I have to change the node type from single value to a set. Because python function is allowed to return different types. The set represent all possible types
-
I added scope_name and scope_type for AstVarScope, because in python functions, variable may have different scope. For example:
a = 3
def foo(b):
a = 9
return a + b
the a
in foo
is different to the a
out of foo
. Similar to class field. The scope_name will help me to know the function name when static analysis finds a return
sentence.