diff --git a/doc/ast/spec.md b/doc/ast/spec.md index 8b360898c7..d37c2265e9 100644 --- a/doc/ast/spec.md +++ b/doc/ast/spec.md @@ -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