Update AST spec.
* Remove redundant `Node` reference from `Identifier` interface. `Expression` already inherits from `Node`. * Add missing interfaces: `Literal`, `Pattern`.
This commit is contained in:
parent
12b7a44796
commit
07f0bd4ea9
@ -141,7 +141,7 @@ interface Position {
|
||||
# Identifier
|
||||
|
||||
```js
|
||||
interface Identifier <: Node, Expression, Pattern {
|
||||
interface Identifier <: Expression, Pattern {
|
||||
type: "Identifier";
|
||||
name: string;
|
||||
}
|
||||
@ -151,6 +151,12 @@ An identifier. Note that an identifier may be an expression or a destructuring p
|
||||
|
||||
# Literals
|
||||
|
||||
```js
|
||||
interface Literal <: Expression { }
|
||||
```
|
||||
|
||||
A literal token. May or may not represent an expression.
|
||||
|
||||
## RegExpLiteral
|
||||
|
||||
```js
|
||||
@ -929,6 +935,10 @@ interface TemplateElement <: Node {
|
||||
|
||||
# Patterns
|
||||
|
||||
```js
|
||||
interface Pattern <: Node { }
|
||||
```
|
||||
|
||||
## ObjectPattern
|
||||
|
||||
```js
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user