Skip to main content
Version: 3.4

MemberExpression 成员表达式

1. 结构声明

class MemberExpression extends LogicItem {
object: LogicItem;
property: LogicItem;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "student"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
}

(2) 示例

AST 如下:

{
"concept": "MemberExpression",
"object": {
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "",
"name": "item"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "student"
}
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "name"
}
}

(3) 枚举标识符

AST 如下:

{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "app.enums",
"name": "Status"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "Normal"
}
}

(4) 数值枚举标识符

AST 如下:

{
"concept": "MemberExpression",
"object": {
"concept": "Identifier",
"namespace": "app.enums",
"name": "Status"
},
"property": {
"concept": "Identifier",
"namespace": "",
"name": "0"
}
}