Skip to main content
Version: 3.4

CallLogic 调用逻辑

1. 结构声明

class CallLogic extends LogicItem {
uuid: uuid;
calleeNamespace: string;
calleeName: string;
shortcut?: boolean;
handleError?: boolean;
typeArguments?: Array<TypeAnnotation>;
arguments: Array<Argument>;
validation?: BindAttribute;
isAdvancedSettingFolded?: boolean;
}

2. 节点示例

(1) 示例

AST 如下:

{
"uuid": "43a14fc183ed4b1bab03a839ea7fce9f",
"concept": "CallLogic",
"label": "调用逻辑",
"calleeNamespace": "elements.saveModal_1.logics",
"calleeName": "open",
"arguments": []
}

(2) 带 shortcut

AST 如下:

{
"uuid": "d5ab84861fa64b5f928b655182c9a19d",
"concept": "CallLogic",
"label": "输出日志",
"calleeNamespace": "nasl.logging",
"calleeName": "INFO",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "模板",
"expression": {
"concept": "StringInterpolation",
"expressions": [
{
"concept": "StringLiteral",
"value": "count: "
},
{
"concept": "CallFunction",
"label": "内置函数",
"calleeNamespace": "nasl.util",
"calleeName": "ListSum",
"typeArguments": [],
"arguments": [
{
"concept": "Argument",
"keyword": "list",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "list"
}
}
]
},
{
"concept": "StringLiteral",
"value": ", length: "
},
{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "list"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "length"
}
}
]
}
}
]
}