This document specifies deprecated extensions to the ESTree API that were at one point supported in Mozilla's SpiderMonkey JavaScript engine for features that were experimental or came from defunct standards.
extend interface Function {
body: BlockStatement | Expression;
expression: boolean;
}If the expression flag is true, the function is an expression closure and the body field is an expression.
extend interface ForInStatement {
each: boolean;
}If each is true, a for each/in statement.
interface LetStatement <: Statement {
type: "LetStatement";
head: [ VariableDeclarator ];
body: Statement;
}A let statement.
extend interface SwitchStatement {
lexical: boolean;
}The lexical flag is metadata indicating whether the switch statement contains any unnested let declarations (and therefore introduces a new lexical scope).
extend interface TryStatement {
handlers: [ CatchClause ];
guardedHandlers: [ CatchClause ];
}The length of handlers may be any non-negative integer.
interface ComprehensionExpression <: Expression {
type: "ComprehensionExpression";
body: Expression;
blocks: [ ComprehensionBlock ];
filter: Expression | null;
}An array comprehension. The blocks array corresponds to the sequence of for and for each blocks. The optional filter expression corresponds to the final if clause, if present.
interface GeneratorExpression <: Expression {
type: "GeneratorExpression";
body: Expression;
blocks: [ ComprehensionBlock ];
filter: Expression | null;
}A generator expression. As with array comprehensions, the blocks array corresponds to the sequence of for and for each blocks, and the optional filter expression corresponds to the final if clause, if present.
interface GraphExpression <: Expression {
type: "GraphExpression";
index: uint32;
expression: Literal;
}A graph expression, aka "sharp literal," such as #1={ self: #1# }.
interface GraphIndexExpression <: Expression {
type: "GraphIndexExpression";
index: uint32;
}A graph index expression, aka "sharp variable," such as #1#.
interface LetExpression <: Expression {
type: "LetExpression";
head: [ VariableDeclarator ];
body: Expression;
}A let expression.
extend interface CatchClause {
guard: Expression | null;
}The optional guard property corresponds to the optional expression guard on the bound variable.
interface ComprehensionBlock <: Node {
type: "ComprehensionBlock";
left: Pattern;
right: Expression;
each: boolean;
}A for or for each block in an array comprehension or generator expression.
extend enum BinaryOperator {
".."
}The ".." token is E4X-specific.
E4X was specified by ECMA-357 but has become a defunct standard. It was implemented for several years in SpiderMonkey but was removed starting in Firefox 21.
interface XMLDefaultDeclaration <: Declaration {
type: "XMLDefaultDeclaration";
namespace: Expression;
}A default xml namespace declaration.
interface XMLAnyName <: Expression {
type: "XMLAnyName";
}The special E4X wildcard pseudo-identifier *.
interface XMLQualifiedIdentifier <: Expression {
type: "XMLQualifiedIdentifier";
left: Identifier | XMLAnyName;
right: Identifier | Expression;
computed: boolean;
}An E4X qualified identifier, i.e., a pseudo-identifier using the namespace separator ::. If the qualified identifier has a computed name (i.e., the id::[expr] form), then computed is true and the right property is an expression.
interface XMLFunctionQualifiedIdentifier <: Expression {
type: "XMLFunctionQualifiedIdentifier";
right: Identifier | Expression;
computed: boolean;
}An E4X identifier qualified by the function keyword, e.g., function::id. (This functionality was a non-standard SpiderMonkey extension.)
interface XMLAttributeSelector <: Expression {
type: "XMLAttributeSelector";
attribute: Expression;
}An E4X attribute selector expression, i.e., an @ expression.
interface XMLFilterExpression <: Expression {
type: "XMLFilterExpression";
left: Expression;
right: Expression;
}An E4X list filter expression, i.e., an expression of the form expr.(expr).
interface XMLElement <: XML, Expression {
type: "XMLElement";
contents: [ XML ];
}An E4X literal representing a single XML element.
interface XMLList <: XML, Expression {
type: "XMLList";
contents: [ XML ];
}An E4X literal representing a list of XML elements.
interface XML <: Node { }XML data.
interface XMLEscape <: XML {
type: "XMLEscape";
expression: Expression;
}XML data with an escaped JavaScript expression.
interface XMLText <: XML {
type: "XMLText";
text: string;
}Literal XML text.
interface XMLStartTag <: XML {
type: "XMLStartTag";
contents: [ XML ];
}An XML start tag.
interface XMLEndTag <: XML {
type: "XMLEndTag";
contents: [ XML ];
}An XML end tag.
interface XMLPointTag <: XML {
type: "XMLPointTag";
contents: [ XML ];
}An XML point tag.
interface XMLName <: XML {
type: "XMLName";
contents: string | [ XML ];
}An XML name.
interface XMLAttribute <: XML {
type: "XMLAttribute";
value: string;
}An XML attribute value.
interface XMLCdata <: XML {
type: "XMLCdata";
contents: string;
}An XML CDATA node.
interface XMLComment <: XML {
type: "XMLComment";
contents: string;
}An XML comment.
interface XMLProcessingInstruction <: XML {
type: "XMLProcessingInstruction";
target: string;
contents: string | null;
}An XML processing instruction.