The invention discloses a
code editor cross-language function positioning method based on hierarchical context driving, which comprises the following steps: by taking an
interpreted language as a source language and a
compiled language as a target language, analyzing a
dependency tree and an
abstract syntax tree of a source language project to collect source variables in a module layer, a function layer and an instance layer to construct a
source tracing table; constructing a layered mapping rule base and establishing a mapping relationship and confidence coefficient between a source variable type and a target variable type in combination with the
traceability table, obtaining a file preloading context and an intermediate
instruction sequence of a source language, capturing a multi-dimensional calling context during cross-language calling after incremental
simulation execution, determining a polymorphic analysis priority, and performing multi-
dimensional analysis on the multi-dimensional calling context; according to the method, the mapped target function is matched, then the
source code path and the line number of the target function are selected in the target language
source code, accurate jump of the
code editor is achieved, meanwhile, the source variable type
traceability chain is displayed at the target function, and the positioning accuracy and the positioning efficiency of the polymorphic function in the cross-language function are improved.