Skip to main content
Version: 3.7

ParamWithGroup 带分组的参数

1. 结构声明

class ParamWithGroup extends Param {
title: string;
group!: string;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "ParamWithGroup",
"name": "size",
"title": "大小",
"group": "分组1",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}

对应的代码如下:

@(
title = "大小",
group = "分组1",
)
size: Integer

(2) 示例

AST 如下:

{
"concept": "ParamWithGroup",
"name": "payload",
"group": "基础信息",
"title": "数据",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"description": "数据量"
}

对应的代码如下:

@(
title = "数据",
group = "基础信息",
)
payload: String