PCART  v1.4
Automated Repair of Python API Parameter Compatibility Issues
Public Member Functions | List of all members
AssignVisitor Class Reference

Get all assign nodes from a lib source file 源码Assign节点遍历器 More...

Inheritance diagram for AssignVisitor:
[legend]
Collaboration diagram for AssignVisitor:
[legend]

Public Member Functions

def __init__ (self)
 Initialize the assign node container 初始化赋值节点容器 More...
 
def get_target_call (self)
 Return the assign target-to-value dictionary 返回赋值目标到值的字典 More...
 
def visit_Assign (self, node)
 Visit an Assign node and record Call-type values 访问Assign节点,记录Call类型的值 More...
 

Detailed Description

Get all assign nodes from a lib source file 源码Assign节点遍历器

For an assign node, extract the values before (the variable name) and after (the value expression) the assignment operator 对于Assign节点,只需要关注等号左右两边的名字

Definition at line 136 of file extractDef.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Initialize the assign node container 初始化赋值节点容器

Definition at line 139 of file extractDef.py.

Member Function Documentation

◆ get_target_call()

def get_target_call (   self)

Return the assign target-to-value dictionary 返回赋值目标到值的字典

Returns
dict mapping target variable name to value expression

Definition at line 145 of file extractDef.py.

◆ visit_Assign()

def visit_Assign (   self,
  node 
)

Visit an Assign node and record Call-type values 访问Assign节点,记录Call类型的值

Parameters
nodeThe Assign AST node
Returns
None

Definition at line 152 of file extractDef.py.


The documentation for this class was generated from the following file: