I want to use your tool to anonymize function variable names. I tried to use your tool to parse the function, and found that after parsing, the variable names all appear as identifiers. In this case, how to distinguish different variable names and where they appear in the function body?
For example, the original code:
def find_max(a, b):
if a > b:
return a
else:
return b
I want to use your tool to anonymize function variable names. I tried to use your tool to parse the function, and found that after parsing, the variable names all appear as identifiers. In this case, how to distinguish different variable names and where they appear in the function body?
For example, the original code:
The result of
tree.root_node.sexp()
:But I want to get: