From 07f0bd4ea93657f8b3158f6aedd8e11721d88015 Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Sat, 23 Jan 2016 10:57:42 -0500 Subject: [PATCH] Update AST spec. * Remove redundant `Node` reference from `Identifier` interface. `Expression` already inherits from `Node`. * Add missing interfaces: `Literal`, `Pattern`. --- doc/ast/spec.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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