Identifier 标识符
1. 结构声明
- TS Declaration
- JSON Schema
class Identifier extends LogicItem {
namespace: string;
name: string = '';
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"namespace": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"namespace",
"name"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "Identifier",
"namespace": "",
"name": "student"
}
concept: Identifier
namespace: ""
name: student
对应的代码如下:
- 文本化 NASL
student
(2) 枚举标识符
AST 如下:
- JSON
- YAML
{
"concept": "Identifier",
"namespace": "app.enums",
"name": "StatusEnum"
}
concept: Identifier
namespace: app.enums
name: StatusEnum
对应的代码如下:
- 文本化 NASL
app::enums::StatusEnum