The application discloses a
source code processing method and device and
electronic equipment. The method comprises the following steps: obtaining
source code and configuration information of a project; performing
syntax analysis
processing on the
source code based on the configuration information, and generating an
abstract syntax tree of the source code; determining a target node of a
correlation function in the
abstract syntax tree, performing analysis
processing on the target node, and obtaining an analysis processing result of the target node; performing code block division based on the analysis processing result of the target node, obtaining a code block division result of the target node, performing
control flow analysis based on the code block division result of the target node, and generating a
control flow graph of the target node; and performing dependency analysis based on the
control flow graph of the target node, and obtaining
dependency information of the target node. In combination with common static code analysis technology and a
dependency information extraction method, the dependency relationship of each function is extracted, code understanding and code
transplantation are facilitated, and the problem of how to extract
dependency information in the code when
software testing is performed on the source code is solved.