@lcap/nasl
Version:
NetEase Application Specific Language
21 lines • 820 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.patchArgument = void 0;
const patchArgument = (currentNode, cacheNode, currentApp, cacheApp) => {
// keyword 不同时,需要重新计算正确的关键字
if (cacheNode.keyword !== currentNode.keyword) {
const callLogic = currentNode.parentNode;
const originLogic = ('getCallNode' in callLogic)
? callLogic.getCallNode()
: undefined;
if (!originLogic) {
currentNode.keyword = cacheNode.keyword;
}
else {
const argumentIndex = callLogic.arguments.indexOf(currentNode);
currentNode.keyword = originLogic.params[argumentIndex].name;
}
}
};
exports.patchArgument = patchArgument;
//# sourceMappingURL=argument.js.map