|
PCART
v1.4
Automated Repair of Python API Parameter Compatibility Issues
|
Extract all call type nodes from a project source file 抽取项目源码中的所有call类型节点 More...
Public Member Functions | |
| def | __init__ (self) |
| Initialize the function call list 初始化函数调用列表 More... | |
| def | dfsVisit (self, node) |
| Depth-first search visit that extracts Call nodes 深度优先遍历,提取Call节点 More... | |
| def | func_call (self) |
| Return collected function call tuples 返回收集到的函数调用元组 More... | |
Extract all call type nodes from a project source file 抽取项目源码中的所有call类型节点
Use a DFS algorithm to traverse the call type node from the root node. Each API call is stored in a tuple (API name, parameters, call statement, line/column span) 从根节点开始,直接找根节点的孩子,Call存在于Expr和Assign节点中。每个API调用存储调用语句及其行列位置
Definition at line 65 of file extractCall.py.
| def __init__ | ( | self | ) |
Initialize the function call list 初始化函数调用列表
Definition at line 68 of file extractCall.py.
| def dfsVisit | ( | self, | |
| node | |||
| ) |
Depth-first search visit that extracts Call nodes 深度优先遍历,提取Call节点
Terminates when a Call node is found or the current node has no children. 结束条件:遇到Call节点或当前节点无子节点
| node | The AST node to traverse |
Definition at line 86 of file extractCall.py.
| func_call | ( | self | ) |
Return collected function call tuples 返回收集到的函数调用元组
Definition at line 76 of file extractCall.py.