Add ObjectMember abstract type
This commit is contained in:
parent
5c1d2ab92f
commit
86287a7a8c
@ -53,8 +53,9 @@ This document specifies the core ESTree AST node types that support the ES5 gram
|
||||
- [AwaitExpression](#awaitexpression)
|
||||
- [ArrayExpression](#arrayexpression)
|
||||
- [ObjectExpression](#objectexpression)
|
||||
- [ObjectProperty](#objectproperty)
|
||||
- [ObjectMethod](#objectmethod)
|
||||
- [ObjectMember](#objectmember)
|
||||
- [ObjectProperty](#objectproperty)
|
||||
- [ObjectMethod](#objectmethod)
|
||||
- [RestProperty](#restproperty)
|
||||
- [SpreadProperty](#spreadproperty)
|
||||
- [FunctionExpression](#functionexpression)
|
||||
@ -631,29 +632,32 @@ interface ObjectExpression <: Expression {
|
||||
|
||||
An object expression.
|
||||
|
||||
### ObjectProperty
|
||||
### ObjectMember
|
||||
|
||||
```js
|
||||
interface ObjectProperty <: Node {
|
||||
type: "ObjectProperty";
|
||||
interface ObjectMember <: Node {
|
||||
key: Expression;
|
||||
computed: boolean;
|
||||
value: Expression;
|
||||
shorthand: boolean;
|
||||
decorators: [ Decorator ];
|
||||
}
|
||||
```
|
||||
|
||||
### ObjectMethod
|
||||
#### ObjectProperty
|
||||
|
||||
```js
|
||||
interface ObjectMethod <: Function {
|
||||
interface ObjectProperty <: ObjectMember {
|
||||
type: "ObjectProperty";
|
||||
shorthand: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
#### ObjectMethod
|
||||
|
||||
```js
|
||||
interface ObjectMethod <: ObjectMember, Function {
|
||||
type: "ObjectMethod";
|
||||
key: Expression;
|
||||
computed: boolean;
|
||||
value: Expression;
|
||||
kind: "get" | "set" | "method";
|
||||
decorators: [ Decorator ];
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@ -498,7 +498,7 @@ defineType("ObjectMethod", {
|
||||
}
|
||||
},
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method"]
|
||||
aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
|
||||
});
|
||||
|
||||
defineType("ObjectProperty", {
|
||||
@ -527,7 +527,7 @@ defineType("ObjectProperty", {
|
||||
}
|
||||
},
|
||||
visitor: ["key", "value", "decorators"],
|
||||
aliases: ["UserWhitespacable", "Property"]
|
||||
aliases: ["UserWhitespacable", "Property", "ObjectMember"]
|
||||
});
|
||||
|
||||
defineType("RestElement", {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user