Anchor 锚点参数
1. 结构声明
- TS Declaration
- JSON Schema
class Anchor extends LogicItem {
expression?: LogicItem;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"expression": {
"$ref": "#/definitions/LogicItem"
}
},
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "Anchor",
"expression": {
"concept": "StringLiteral",
"value": "标题1"
}
}
concept: Anchor
expression:
concept: StringLiteral
value: 标题1
对应的代码如下:
- 文本化 NASL
- Natural TS
'标题1'
'标题1'