Skip to main content
Version: 3.8

Variable 变量

1. 结构声明

class Variable extends BaseNode {
name: string = '';
description?: string;
typeAnnotation?: TypeAnnotation;
defaultValue?: DefaultValue;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "Variable",
"name": "total",
"description": "",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long",
"inferred": false,
"ruleMap": {}
}
}

对应的代码如下:

total: Integer