shift-spec
Advanced tools
Comparing version 2015.2.1 to 2016.0.0
1110
dist/index.js
// Generated by src/generate-spec.js. | ||
/** | ||
* Copyright 2015 Shape Security, Inc. | ||
* Copyright 2016 Shape Security, Inc. | ||
* | ||
@@ -24,3 +24,2 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
// Meta data generated from spec.idl. | ||
exports.default = (function() { | ||
@@ -37,91 +36,74 @@ var SPEC = {}; | ||
var TYPE_INDICATOR = { | ||
typeName: "Enum", | ||
values: ["ArrayBinding", "ArrayExpression", "ArrowExpression", "AssignmentExpression", "BinaryExpression", "BindingIdentifier", "BindingProperty", "BindingPropertyIdentifier", "BindingPropertyProperty", "BindingWithDefault", "Block", "BlockStatement", "BreakStatement", "CallExpression", "CatchClause", "Class", "ClassDeclaration", "ClassElement", "ClassExpression", "CompoundAssignmentExpression", "ComputedMemberExpression", "ComputedPropertyName", "ConditionalExpression", "ContinueStatement", "DataProperty", "DebuggerStatement", "Directive", "DoWhileStatement", "EmptyStatement", "Export", "ExportAllFrom", "ExportDeclaration", "ExportDefault", "ExportFrom", "ExportSpecifier", "Expression", "ExpressionStatement", "ForInStatement", "ForOfStatement", "ForStatement", "FormalParameters", "Function", "FunctionBody", "FunctionDeclaration", "FunctionExpression", "Getter", "IdentifierExpression", "IfStatement", "Import", "ImportDeclaration", "ImportNamespace", "ImportSpecifier", "IterationStatement", "LabeledStatement", "LiteralBooleanExpression", "LiteralInfinityExpression", "LiteralNullExpression", "LiteralNumericExpression", "LiteralRegExpExpression", "LiteralStringExpression", "MemberExpression", "Method", "MethodDefinition", "Module", "NamedObjectProperty", "NewExpression", "NewTargetExpression", "Node", "ObjectBinding", "ObjectExpression", "ObjectProperty", "PropertyName", "ReturnStatement", "Script", "Setter", "ShorthandProperty", "SourceLocation", "SourceSpan", "SpreadElement", "Statement", "StaticMemberExpression", "StaticPropertyName", "Super", "SwitchCase", "SwitchDefault", "SwitchStatement", "SwitchStatementWithDefault", "TemplateElement", "TemplateExpression", "ThisExpression", "ThrowStatement", "TryCatchStatement", "TryFinallyStatement", "UnaryExpression", "UpdateExpression", "VariableDeclaration", "VariableDeclarationStatement", "VariableDeclarator", "WhileStatement", "WithStatement", "YieldExpression", "YieldGeneratorExpression"] | ||
values: ["ArrayAssignmentTarget", "ArrayBinding", "ArrayExpression", "ArrowExpression", "AssignmentExpression", "AssignmentTargetIdentifier", "AssignmentTargetPropertyIdentifier", "AssignmentTargetPropertyProperty", "AssignmentTargetWithDefault", "BinaryExpression", "BindingIdentifier", "BindingPropertyIdentifier", "BindingPropertyProperty", "BindingWithDefault", "Block", "BlockStatement", "BreakStatement", "CallExpression", "CatchClause", "ClassDeclaration", "ClassElement", "ClassExpression", "CompoundAssignmentExpression", "ComputedMemberAssignmentTarget", "ComputedMemberExpression", "ComputedPropertyName", "ConditionalExpression", "ContinueStatement", "DataProperty", "DebuggerStatement", "Directive", "DoWhileStatement", "EmptyStatement", "Export", "ExportAllFrom", "ExportDefault", "ExportFrom", "ExportFromSpecifier", "ExportLocalSpecifier", "ExportLocals", "ExpressionStatement", "ForInStatement", "ForOfStatement", "ForStatement", "FormalParameters", "FunctionBody", "FunctionDeclaration", "FunctionExpression", "Getter", "IdentifierExpression", "IfStatement", "Import", "ImportNamespace", "ImportSpecifier", "LabeledStatement", "LiteralBooleanExpression", "LiteralInfinityExpression", "LiteralNullExpression", "LiteralNumericExpression", "LiteralRegExpExpression", "LiteralStringExpression", "Method", "Module", "NewExpression", "NewTargetExpression", "ObjectAssignmentTarget", "ObjectBinding", "ObjectExpression", "ReturnStatement", "Script", "Setter", "ShorthandProperty", "SpreadElement", "StaticMemberAssignmentTarget", "StaticMemberExpression", "StaticPropertyName", "Super", "SwitchCase", "SwitchDefault", "SwitchStatement", "SwitchStatementWithDefault", "TemplateElement", "TemplateExpression", "ThisExpression", "ThrowStatement", "TryCatchStatement", "TryFinallyStatement", "UnaryExpression", "UpdateExpression", "VariableDeclaration", "VariableDeclarationStatement", "VariableDeclarator", "WhileStatement", "WithStatement", "YieldExpression", "YieldGeneratorExpression"] | ||
}; | ||
var VariableDeclarationKind = { | ||
var BinaryOperator = { | ||
typeName: "Enum", | ||
values: ["var", "let", "const"] | ||
}; | ||
values: ["==", "!=", "===", "!==", "<", "<=", ">", ">=", "in", "instanceof", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&"] | ||
} | ||
var CompoundAssignmentOperator = { | ||
typeName: "Enum", | ||
values: ["+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&="] | ||
}; | ||
var BinaryOperator = { | ||
typeName: "Enum", | ||
values: ["==", "!=", "===", "!==", "<", "<=", ">", ">=", "in", "instanceof", "<<", ">>", ">>>", "+", "-", "*", "/", "%", ",", "||", "&&", "|", "^", "&"] | ||
}; | ||
values: ["+=", "-=", "*=", "/=", "%=", "**=", "<<=", ">>=", ">>>=", "|=", "^=", "&="] | ||
} | ||
var UnaryOperator = { | ||
typeName: "Enum", | ||
values: ["+", "-", "!", "~", "typeof", "void", "delete"] | ||
}; | ||
} | ||
var UpdateOperator = { | ||
typeName: "Enum", | ||
values: ["++", "--"] | ||
}; | ||
} | ||
var VariableDeclarationKind = { | ||
typeName: "Enum", | ||
values: ["var", "let", "const"] | ||
} | ||
var SourceLocation = SPEC.SourceLocation = {}; | ||
var SourceSpan = SPEC.SourceSpan = {}; | ||
var BindingWithDefault = SPEC.BindingWithDefault = {}; | ||
var BindingIdentifier = SPEC.BindingIdentifier = {}; | ||
var ArrayAssignmentTarget = SPEC.ArrayAssignmentTarget = {}; | ||
var ArrayBinding = SPEC.ArrayBinding = {}; | ||
var ObjectBinding = SPEC.ObjectBinding = {}; | ||
var BindingPropertyIdentifier = SPEC.BindingPropertyIdentifier = {}; | ||
var BindingPropertyProperty = SPEC.BindingPropertyProperty = {}; | ||
var ClassExpression = SPEC.ClassExpression = {}; | ||
var ClassDeclaration = SPEC.ClassDeclaration = {}; | ||
var ClassElement = SPEC.ClassElement = {}; | ||
var Module = SPEC.Module = {}; | ||
var Import = SPEC.Import = {}; | ||
var ImportNamespace = SPEC.ImportNamespace = {}; | ||
var ImportSpecifier = SPEC.ImportSpecifier = {}; | ||
var ExportAllFrom = SPEC.ExportAllFrom = {}; | ||
var ExportFrom = SPEC.ExportFrom = {}; | ||
var Export = SPEC.Export = {}; | ||
var ExportDefault = SPEC.ExportDefault = {}; | ||
var ExportSpecifier = SPEC.ExportSpecifier = {}; | ||
var Method = SPEC.Method = {}; | ||
var Getter = SPEC.Getter = {}; | ||
var Setter = SPEC.Setter = {}; | ||
var DataProperty = SPEC.DataProperty = {}; | ||
var ShorthandProperty = SPEC.ShorthandProperty = {}; | ||
var ComputedPropertyName = SPEC.ComputedPropertyName = {}; | ||
var StaticPropertyName = SPEC.StaticPropertyName = {}; | ||
var LiteralBooleanExpression = SPEC.LiteralBooleanExpression = {}; | ||
var LiteralInfinityExpression = SPEC.LiteralInfinityExpression = {}; | ||
var LiteralNullExpression = SPEC.LiteralNullExpression = {}; | ||
var LiteralNumericExpression = SPEC.LiteralNumericExpression = {}; | ||
var LiteralRegExpExpression = SPEC.LiteralRegExpExpression = {}; | ||
var LiteralStringExpression = SPEC.LiteralStringExpression = {}; | ||
var ArrayExpression = SPEC.ArrayExpression = {}; | ||
var ArrowExpression = SPEC.ArrowExpression = {}; | ||
var AssignmentExpression = SPEC.AssignmentExpression = {}; | ||
var AssignmentTargetIdentifier = SPEC.AssignmentTargetIdentifier = {}; | ||
var AssignmentTargetPropertyIdentifier = SPEC.AssignmentTargetPropertyIdentifier = {}; | ||
var AssignmentTargetPropertyProperty = SPEC.AssignmentTargetPropertyProperty = {}; | ||
var AssignmentTargetWithDefault = SPEC.AssignmentTargetWithDefault = {}; | ||
var BinaryExpression = SPEC.BinaryExpression = {}; | ||
var BindingIdentifier = SPEC.BindingIdentifier = {}; | ||
var BindingPropertyIdentifier = SPEC.BindingPropertyIdentifier = {}; | ||
var BindingPropertyProperty = SPEC.BindingPropertyProperty = {}; | ||
var BindingWithDefault = SPEC.BindingWithDefault = {}; | ||
var Block = SPEC.Block = {}; | ||
var BlockStatement = SPEC.BlockStatement = {}; | ||
var BreakStatement = SPEC.BreakStatement = {}; | ||
var CallExpression = SPEC.CallExpression = {}; | ||
var CatchClause = SPEC.CatchClause = {}; | ||
var ClassDeclaration = SPEC.ClassDeclaration = {}; | ||
var ClassElement = SPEC.ClassElement = {}; | ||
var ClassExpression = SPEC.ClassExpression = {}; | ||
var CompoundAssignmentExpression = SPEC.CompoundAssignmentExpression = {}; | ||
var ComputedMemberAssignmentTarget = SPEC.ComputedMemberAssignmentTarget = {}; | ||
var ComputedMemberExpression = SPEC.ComputedMemberExpression = {}; | ||
var ComputedPropertyName = SPEC.ComputedPropertyName = {}; | ||
var ConditionalExpression = SPEC.ConditionalExpression = {}; | ||
var FunctionExpression = SPEC.FunctionExpression = {}; | ||
var IdentifierExpression = SPEC.IdentifierExpression = {}; | ||
var NewExpression = SPEC.NewExpression = {}; | ||
var NewTargetExpression = SPEC.NewTargetExpression = {}; | ||
var ObjectExpression = SPEC.ObjectExpression = {}; | ||
var UnaryExpression = SPEC.UnaryExpression = {}; | ||
var StaticMemberExpression = SPEC.StaticMemberExpression = {}; | ||
var TemplateExpression = SPEC.TemplateExpression = {}; | ||
var ThisExpression = SPEC.ThisExpression = {}; | ||
var UpdateExpression = SPEC.UpdateExpression = {}; | ||
var YieldExpression = SPEC.YieldExpression = {}; | ||
var YieldGeneratorExpression = SPEC.YieldGeneratorExpression = {}; | ||
var BlockStatement = SPEC.BlockStatement = {}; | ||
var BreakStatement = SPEC.BreakStatement = {}; | ||
var ContinueStatement = SPEC.ContinueStatement = {}; | ||
var DataProperty = SPEC.DataProperty = {}; | ||
var DebuggerStatement = SPEC.DebuggerStatement = {}; | ||
var Directive = SPEC.Directive = {}; | ||
var DoWhileStatement = SPEC.DoWhileStatement = {}; | ||
var EmptyStatement = SPEC.EmptyStatement = {}; | ||
var Export = SPEC.Export = {}; | ||
var ExportAllFrom = SPEC.ExportAllFrom = {}; | ||
var ExportDefault = SPEC.ExportDefault = {}; | ||
var ExportFrom = SPEC.ExportFrom = {}; | ||
var ExportFromSpecifier = SPEC.ExportFromSpecifier = {}; | ||
var ExportLocalSpecifier = SPEC.ExportLocalSpecifier = {}; | ||
var ExportLocals = SPEC.ExportLocals = {}; | ||
var ExpressionStatement = SPEC.ExpressionStatement = {}; | ||
@@ -131,93 +113,154 @@ var ForInStatement = SPEC.ForInStatement = {}; | ||
var ForStatement = SPEC.ForStatement = {}; | ||
var FormalParameters = SPEC.FormalParameters = {}; | ||
var FunctionBody = SPEC.FunctionBody = {}; | ||
var FunctionDeclaration = SPEC.FunctionDeclaration = {}; | ||
var FunctionExpression = SPEC.FunctionExpression = {}; | ||
var Getter = SPEC.Getter = {}; | ||
var IdentifierExpression = SPEC.IdentifierExpression = {}; | ||
var IfStatement = SPEC.IfStatement = {}; | ||
var Import = SPEC.Import = {}; | ||
var ImportNamespace = SPEC.ImportNamespace = {}; | ||
var ImportSpecifier = SPEC.ImportSpecifier = {}; | ||
var LabeledStatement = SPEC.LabeledStatement = {}; | ||
var LiteralBooleanExpression = SPEC.LiteralBooleanExpression = {}; | ||
var LiteralInfinityExpression = SPEC.LiteralInfinityExpression = {}; | ||
var LiteralNullExpression = SPEC.LiteralNullExpression = {}; | ||
var LiteralNumericExpression = SPEC.LiteralNumericExpression = {}; | ||
var LiteralRegExpExpression = SPEC.LiteralRegExpExpression = {}; | ||
var LiteralStringExpression = SPEC.LiteralStringExpression = {}; | ||
var Method = SPEC.Method = {}; | ||
var Module = SPEC.Module = {}; | ||
var NewExpression = SPEC.NewExpression = {}; | ||
var NewTargetExpression = SPEC.NewTargetExpression = {}; | ||
var ObjectAssignmentTarget = SPEC.ObjectAssignmentTarget = {}; | ||
var ObjectBinding = SPEC.ObjectBinding = {}; | ||
var ObjectExpression = SPEC.ObjectExpression = {}; | ||
var ReturnStatement = SPEC.ReturnStatement = {}; | ||
var Script = SPEC.Script = {}; | ||
var Setter = SPEC.Setter = {}; | ||
var ShorthandProperty = SPEC.ShorthandProperty = {}; | ||
var SpreadElement = SPEC.SpreadElement = {}; | ||
var StaticMemberAssignmentTarget = SPEC.StaticMemberAssignmentTarget = {}; | ||
var StaticMemberExpression = SPEC.StaticMemberExpression = {}; | ||
var StaticPropertyName = SPEC.StaticPropertyName = {}; | ||
var Super = SPEC.Super = {}; | ||
var SwitchCase = SPEC.SwitchCase = {}; | ||
var SwitchDefault = SPEC.SwitchDefault = {}; | ||
var SwitchStatement = SPEC.SwitchStatement = {}; | ||
var SwitchStatementWithDefault = SPEC.SwitchStatementWithDefault = {}; | ||
var TemplateElement = SPEC.TemplateElement = {}; | ||
var TemplateExpression = SPEC.TemplateExpression = {}; | ||
var ThisExpression = SPEC.ThisExpression = {}; | ||
var ThrowStatement = SPEC.ThrowStatement = {}; | ||
var TryCatchStatement = SPEC.TryCatchStatement = {}; | ||
var TryFinallyStatement = SPEC.TryFinallyStatement = {}; | ||
var UnaryExpression = SPEC.UnaryExpression = {}; | ||
var UpdateExpression = SPEC.UpdateExpression = {}; | ||
var VariableDeclaration = SPEC.VariableDeclaration = {}; | ||
var VariableDeclarationStatement = SPEC.VariableDeclarationStatement = {}; | ||
var VariableDeclarator = SPEC.VariableDeclarator = {}; | ||
var WhileStatement = SPEC.WhileStatement = {}; | ||
var WithStatement = SPEC.WithStatement = {}; | ||
var Block = SPEC.Block = {}; | ||
var CatchClause = SPEC.CatchClause = {}; | ||
var Directive = SPEC.Directive = {}; | ||
var FormalParameters = SPEC.FormalParameters = {}; | ||
var FunctionBody = SPEC.FunctionBody = {}; | ||
var FunctionDeclaration = SPEC.FunctionDeclaration = {}; | ||
var Script = SPEC.Script = {}; | ||
var SpreadElement = SPEC.SpreadElement = {}; | ||
var Super = SPEC.Super = {}; | ||
var SwitchCase = SPEC.SwitchCase = {}; | ||
var SwitchDefault = SPEC.SwitchDefault = {}; | ||
var TemplateElement = SPEC.TemplateElement = {}; | ||
var VariableDeclaration = SPEC.VariableDeclaration = {}; | ||
var VariableDeclarator = SPEC.VariableDeclarator = {}; | ||
var YieldExpression = SPEC.YieldExpression = {}; | ||
var YieldGeneratorExpression = SPEC.YieldGeneratorExpression = {}; | ||
var Class = Union(ClassExpression, ClassDeclaration); | ||
var MemberExpression = Union(ComputedMemberExpression, StaticMemberExpression); | ||
var AssignmentTargetProperty = Union(AssignmentTargetPropertyIdentifier, AssignmentTargetPropertyProperty); | ||
var Class = Union(ClassDeclaration, ClassExpression); | ||
var ExportDeclaration = Union(Export, ExportAllFrom, ExportDefault, ExportFrom, ExportLocals); | ||
var PropertyName = Union(ComputedPropertyName, StaticPropertyName); | ||
var Function = Union(FunctionDeclaration, FunctionExpression); | ||
var ImportDeclaration = Union(Import, ImportNamespace); | ||
var IterationStatement = Union(DoWhileStatement, ForInStatement, ForOfStatement, ForStatement, WhileStatement); | ||
var MemberAssignmentTarget = Union(ComputedMemberAssignmentTarget, StaticMemberAssignmentTarget); | ||
var BindingProperty = Union(BindingPropertyIdentifier, BindingPropertyProperty); | ||
var ExportDeclaration = Union(ExportAllFrom, ExportFrom, Export, ExportDefault); | ||
var ImportDeclaration = Union(Import, ImportNamespace); | ||
var MethodDefinition = Union(Method, Getter, Setter); | ||
var NamedObjectProperty = Union(MethodDefinition, DataProperty); | ||
var MethodDefinition = Union(Getter, Method, Setter); | ||
var Program = Union(Module, Script); | ||
var VariableReference = Union(AssignmentTargetIdentifier, BindingIdentifier, IdentifierExpression); | ||
var NamedObjectProperty = Union(DataProperty, MethodDefinition); | ||
var Expression = Union(ArrayExpression, ArrowExpression, AssignmentExpression, BinaryExpression, CallExpression, ClassExpression, CompoundAssignmentExpression, ConditionalExpression, FunctionExpression, IdentifierExpression, LiteralBooleanExpression, LiteralInfinityExpression, LiteralNullExpression, LiteralNumericExpression, LiteralRegExpExpression, LiteralStringExpression, MemberExpression, NewExpression, NewTargetExpression, ObjectExpression, TemplateExpression, ThisExpression, UnaryExpression, UpdateExpression, YieldExpression, YieldGeneratorExpression); | ||
var Statement = Union(BlockStatement, BreakStatement, ClassDeclaration, ContinueStatement, DebuggerStatement, EmptyStatement, ExpressionStatement, FunctionDeclaration, IfStatement, IterationStatement, LabeledStatement, ReturnStatement, SwitchStatement, SwitchStatementWithDefault, ThrowStatement, TryCatchStatement, TryFinallyStatement, VariableDeclarationStatement, WithStatement); | ||
var ObjectProperty = Union(NamedObjectProperty, ShorthandProperty); | ||
var PropertyName = Union(ComputedPropertyName, StaticPropertyName); | ||
var MemberExpression = Union(ComputedMemberExpression, StaticMemberExpression); | ||
var Expression = Union(MemberExpression, ClassExpression, LiteralBooleanExpression, LiteralInfinityExpression, LiteralNullExpression, LiteralNumericExpression, LiteralRegExpExpression, LiteralStringExpression, ArrayExpression, ArrowExpression, AssignmentExpression, BinaryExpression, CallExpression, CompoundAssignmentExpression, ConditionalExpression, FunctionExpression, IdentifierExpression, NewExpression, NewTargetExpression, ObjectExpression, UnaryExpression, TemplateExpression, ThisExpression, UpdateExpression, YieldExpression, YieldGeneratorExpression); | ||
var IterationStatement = Union(DoWhileStatement, ForInStatement, ForOfStatement, ForStatement, WhileStatement); | ||
var Statement = Union(IterationStatement, ClassDeclaration, BlockStatement, BreakStatement, ContinueStatement, DebuggerStatement, EmptyStatement, ExpressionStatement, IfStatement, LabeledStatement, ReturnStatement, SwitchStatement, SwitchStatementWithDefault, ThrowStatement, TryCatchStatement, TryFinallyStatement, VariableDeclarationStatement, WithStatement, FunctionDeclaration); | ||
var Node = Union(Statement, Expression, PropertyName, ObjectProperty, ImportDeclaration, ExportDeclaration, BindingWithDefault, BindingIdentifier, ArrayBinding, ObjectBinding, BindingProperty, ClassElement, Module, ImportSpecifier, ExportSpecifier, Block, CatchClause, Directive, FormalParameters, FunctionBody, Script, SpreadElement, Super, SwitchCase, SwitchDefault, TemplateElement, VariableDeclaration, VariableDeclarator); | ||
var Function = Union(FunctionExpression, FunctionDeclaration); | ||
var Node = Union(ArrayAssignmentTarget, ArrayBinding, AssignmentTargetProperty, AssignmentTargetWithDefault, BindingProperty, BindingWithDefault, Block, CatchClause, ClassElement, Directive, ExportDeclaration, ExportFromSpecifier, ExportLocalSpecifier, Expression, FormalParameters, FunctionBody, ImportDeclaration, ImportSpecifier, MemberAssignmentTarget, ObjectAssignmentTarget, ObjectBinding, ObjectProperty, Program, PropertyName, SpreadElement, Statement, Super, SwitchCase, SwitchDefault, TemplateElement, VariableDeclaration, VariableDeclarator, VariableReference); | ||
SourceLocation.typeName = "SourceLocation"; | ||
SourceLocation.fields = [ | ||
{ name: "line", type: DOUBLE }, | ||
{ name: "column", type: DOUBLE }, | ||
{ name: "offset", type: DOUBLE }, | ||
ArrayAssignmentTarget.typeName = "ArrayAssignmentTarget"; | ||
ArrayAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayAssignmentTarget" }, | ||
{ name: "elements", type: List(Maybe(Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))))) }, | ||
{ name: "rest", type: Maybe(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) } | ||
]; | ||
SourceSpan.typeName = "SourceSpan"; | ||
SourceSpan.fields = [ | ||
{ name: "source", type: Maybe(STRING) }, | ||
{ name: "start", type: SourceLocation }, | ||
{ name: "end", type: SourceLocation }, | ||
ArrayBinding.typeName = "ArrayBinding"; | ||
ArrayBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayBinding" }, | ||
{ name: "elements", type: List(Maybe(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))))) }, | ||
{ name: "rest", type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
]; | ||
BindingWithDefault.typeName = "BindingWithDefault"; | ||
BindingWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingWithDefault" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "binding", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "init", type: Expression }, | ||
ArrayExpression.typeName = "ArrayExpression"; | ||
ArrayExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayExpression" }, | ||
{ name: "elements", type: List(Maybe(Union(Expression, SpreadElement))) } | ||
]; | ||
BindingIdentifier.typeName = "BindingIdentifier"; | ||
BindingIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingIdentifier" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: STRING }, | ||
ArrowExpression.typeName = "ArrowExpression"; | ||
ArrowExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrowExpression" }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: Union(Expression, FunctionBody) } | ||
]; | ||
ArrayBinding.typeName = "ArrayBinding"; | ||
ArrayBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayBinding" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "elements", type: List(Maybe(Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression, BindingWithDefault))) }, | ||
{ name: "restElement", type: Maybe(Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression)) }, | ||
AssignmentExpression.typeName = "AssignmentExpression"; | ||
AssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentExpression" }, | ||
{ name: "binding", type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ObjectBinding.typeName = "ObjectBinding"; | ||
ObjectBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectBinding" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "properties", type: List(BindingProperty) }, | ||
AssignmentTargetIdentifier.typeName = "AssignmentTargetIdentifier"; | ||
AssignmentTargetIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetIdentifier" }, | ||
{ name: "name", type: STRING } | ||
]; | ||
AssignmentTargetPropertyIdentifier.typeName = "AssignmentTargetPropertyIdentifier"; | ||
AssignmentTargetPropertyIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetPropertyIdentifier" }, | ||
{ name: "binding", type: AssignmentTargetIdentifier }, | ||
{ name: "init", type: Maybe(Expression) } | ||
]; | ||
AssignmentTargetPropertyProperty.typeName = "AssignmentTargetPropertyProperty"; | ||
AssignmentTargetPropertyProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetPropertyProperty" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "binding", type: Union(AssignmentTargetWithDefault, Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget))) } | ||
]; | ||
AssignmentTargetWithDefault.typeName = "AssignmentTargetWithDefault"; | ||
AssignmentTargetWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentTargetWithDefault" }, | ||
{ name: "binding", type: Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)) }, | ||
{ name: "init", type: Expression } | ||
]; | ||
BinaryExpression.typeName = "BinaryExpression"; | ||
BinaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BinaryExpression" }, | ||
{ name: "left", type: Expression }, | ||
{ name: "operator", type: BinaryOperator }, | ||
{ name: "right", type: Expression } | ||
]; | ||
BindingIdentifier.typeName = "BindingIdentifier"; | ||
BindingIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingIdentifier" }, | ||
{ name: "name", type: STRING } | ||
]; | ||
BindingPropertyIdentifier.typeName = "BindingPropertyIdentifier"; | ||
BindingPropertyIdentifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingPropertyIdentifier" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "binding", type: BindingIdentifier }, | ||
{ name: "init", type: Maybe(Expression) }, | ||
{ name: "init", type: Maybe(Expression) } | ||
]; | ||
@@ -228,23 +271,51 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingPropertyProperty" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "binding", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression, BindingWithDefault) }, | ||
{ name: "binding", type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
]; | ||
ClassExpression.typeName = "ClassExpression"; | ||
ClassExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "super", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(ClassElement) }, | ||
BindingWithDefault.typeName = "BindingWithDefault"; | ||
BindingWithDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BindingWithDefault" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "init", type: Expression } | ||
]; | ||
Block.typeName = "Block"; | ||
Block.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Block" }, | ||
{ name: "statements", type: List(Statement) } | ||
]; | ||
BlockStatement.typeName = "BlockStatement"; | ||
BlockStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BlockStatement" }, | ||
{ name: "block", type: Block } | ||
]; | ||
BreakStatement.typeName = "BreakStatement"; | ||
BreakStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BreakStatement" }, | ||
{ name: "label", type: Maybe(STRING) } | ||
]; | ||
CallExpression.typeName = "CallExpression"; | ||
CallExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CallExpression" }, | ||
{ name: "callee", type: Union(Expression, Super) }, | ||
{ name: "arguments", type: List(Union(Expression, SpreadElement)) } | ||
]; | ||
CatchClause.typeName = "CatchClause"; | ||
CatchClause.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CatchClause" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "body", type: Block } | ||
]; | ||
ClassDeclaration.typeName = "ClassDeclaration"; | ||
ClassDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassDeclaration" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: BindingIdentifier }, | ||
{ name: "super", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(ClassElement) }, | ||
{ name: "elements", type: List(ClassElement) } | ||
]; | ||
@@ -255,139 +326,249 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassElement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "isStatic", type: BOOLEAN }, | ||
{ name: "method", type: MethodDefinition }, | ||
{ name: "method", type: MethodDefinition } | ||
]; | ||
Module.typeName = "Module"; | ||
Module.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Module" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "items", type: List(Union(ImportDeclaration, ExportDeclaration, Statement)) }, | ||
ClassExpression.typeName = "ClassExpression"; | ||
ClassExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ClassExpression" }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "super", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(ClassElement) } | ||
]; | ||
Import.typeName = "Import"; | ||
Import.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Import" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "moduleSpecifier", type: STRING }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namedImports", type: List(ImportSpecifier) }, | ||
CompoundAssignmentExpression.typeName = "CompoundAssignmentExpression"; | ||
CompoundAssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CompoundAssignmentExpression" }, | ||
{ name: "binding", type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) }, | ||
{ name: "operator", type: CompoundAssignmentOperator }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ImportNamespace.typeName = "ImportNamespace"; | ||
ImportNamespace.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportNamespace" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "moduleSpecifier", type: STRING }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namespaceBinding", type: BindingIdentifier }, | ||
ComputedMemberAssignmentTarget.typeName = "ComputedMemberAssignmentTarget"; | ||
ComputedMemberAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedMemberAssignmentTarget" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ImportSpecifier.typeName = "ImportSpecifier"; | ||
ImportSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportSpecifier" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: Maybe(STRING) }, | ||
{ name: "binding", type: BindingIdentifier }, | ||
ComputedMemberExpression.typeName = "ComputedMemberExpression"; | ||
ComputedMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedMemberExpression" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ExportAllFrom.typeName = "ExportAllFrom"; | ||
ExportAllFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportAllFrom" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "moduleSpecifier", type: STRING }, | ||
ComputedPropertyName.typeName = "ComputedPropertyName"; | ||
ComputedPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedPropertyName" }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ExportFrom.typeName = "ExportFrom"; | ||
ExportFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportFrom" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "namedExports", type: List(ExportSpecifier) }, | ||
{ name: "moduleSpecifier", type: Maybe(STRING) }, | ||
ConditionalExpression.typeName = "ConditionalExpression"; | ||
ConditionalExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ConditionalExpression" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Expression }, | ||
{ name: "alternate", type: Expression } | ||
]; | ||
ContinueStatement.typeName = "ContinueStatement"; | ||
ContinueStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ContinueStatement" }, | ||
{ name: "label", type: Maybe(STRING) } | ||
]; | ||
DataProperty.typeName = "DataProperty"; | ||
DataProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DataProperty" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
DebuggerStatement.typeName = "DebuggerStatement"; | ||
DebuggerStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DebuggerStatement" } | ||
]; | ||
Directive.typeName = "Directive"; | ||
Directive.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Directive" }, | ||
{ name: "rawValue", type: STRING } | ||
]; | ||
DoWhileStatement.typeName = "DoWhileStatement"; | ||
DoWhileStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DoWhileStatement" }, | ||
{ name: "body", type: Statement }, | ||
{ name: "test", type: Expression } | ||
]; | ||
EmptyStatement.typeName = "EmptyStatement"; | ||
EmptyStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "EmptyStatement" } | ||
]; | ||
Export.typeName = "Export"; | ||
Export.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Export" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "declaration", type: Union(FunctionDeclaration, ClassDeclaration, VariableDeclaration) }, | ||
{ name: "declaration", type: Union(ClassDeclaration, FunctionDeclaration, VariableDeclaration) } | ||
]; | ||
ExportAllFrom.typeName = "ExportAllFrom"; | ||
ExportAllFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportAllFrom" }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
]; | ||
ExportDefault.typeName = "ExportDefault"; | ||
ExportDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportDefault" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "body", type: Union(FunctionDeclaration, ClassDeclaration, Expression) }, | ||
{ name: "body", type: Union(ClassDeclaration, Expression, FunctionDeclaration) } | ||
]; | ||
ExportSpecifier.typeName = "ExportSpecifier"; | ||
ExportSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportSpecifier" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: Maybe(STRING) }, | ||
{ name: "exportedName", type: STRING }, | ||
ExportFrom.typeName = "ExportFrom"; | ||
ExportFrom.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportFrom" }, | ||
{ name: "namedExports", type: List(ExportFromSpecifier) }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
]; | ||
Method.typeName = "Method"; | ||
Method.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Method" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: PropertyName }, | ||
ExportFromSpecifier.typeName = "ExportFromSpecifier"; | ||
ExportFromSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportFromSpecifier" }, | ||
{ name: "name", type: STRING }, | ||
{ name: "exportedName", type: Maybe(STRING) } | ||
]; | ||
ExportLocalSpecifier.typeName = "ExportLocalSpecifier"; | ||
ExportLocalSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportLocalSpecifier" }, | ||
{ name: "name", type: IdentifierExpression }, | ||
{ name: "exportedName", type: Maybe(STRING) } | ||
]; | ||
ExportLocals.typeName = "ExportLocals"; | ||
ExportLocals.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExportLocals" }, | ||
{ name: "namedExports", type: List(ExportLocalSpecifier) } | ||
]; | ||
ExpressionStatement.typeName = "ExpressionStatement"; | ||
ExpressionStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExpressionStatement" }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
ForInStatement.typeName = "ForInStatement"; | ||
ForInStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForInStatement" }, | ||
{ name: "left", type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement } | ||
]; | ||
ForOfStatement.typeName = "ForOfStatement"; | ||
ForOfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForOfStatement" }, | ||
{ name: "left", type: Union(Union(Union(ArrayAssignmentTarget, ObjectAssignmentTarget), Union(AssignmentTargetIdentifier, MemberAssignmentTarget)), VariableDeclaration) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement } | ||
]; | ||
ForStatement.typeName = "ForStatement"; | ||
ForStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForStatement" }, | ||
{ name: "init", type: Maybe(Union(Expression, VariableDeclaration)) }, | ||
{ name: "test", type: Maybe(Expression) }, | ||
{ name: "update", type: Maybe(Expression) }, | ||
{ name: "body", type: Statement } | ||
]; | ||
FormalParameters.typeName = "FormalParameters"; | ||
FormalParameters.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FormalParameters" }, | ||
{ name: "items", type: List(Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)))) }, | ||
{ name: "rest", type: Maybe(Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) } | ||
]; | ||
FunctionBody.typeName = "FunctionBody"; | ||
FunctionBody.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionBody" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) } | ||
]; | ||
FunctionDeclaration.typeName = "FunctionDeclaration"; | ||
FunctionDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionDeclaration" }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: BindingIdentifier }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody }, | ||
{ name: "body", type: FunctionBody } | ||
]; | ||
FunctionExpression.typeName = "FunctionExpression"; | ||
FunctionExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionExpression" }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody } | ||
]; | ||
Getter.typeName = "Getter"; | ||
Getter.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Getter" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "body", type: FunctionBody }, | ||
{ name: "body", type: FunctionBody } | ||
]; | ||
Setter.typeName = "Setter"; | ||
Setter.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Setter" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "param", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression, BindingWithDefault) }, | ||
{ name: "body", type: FunctionBody }, | ||
IdentifierExpression.typeName = "IdentifierExpression"; | ||
IdentifierExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IdentifierExpression" }, | ||
{ name: "name", type: STRING } | ||
]; | ||
DataProperty.typeName = "DataProperty"; | ||
DataProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DataProperty" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "expression", type: Expression }, | ||
IfStatement.typeName = "IfStatement"; | ||
IfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IfStatement" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Statement }, | ||
{ name: "alternate", type: Maybe(Statement) } | ||
]; | ||
ShorthandProperty.typeName = "ShorthandProperty"; | ||
ShorthandProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ShorthandProperty" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: STRING }, | ||
Import.typeName = "Import"; | ||
Import.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Import" }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namedImports", type: List(ImportSpecifier) }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
]; | ||
ComputedPropertyName.typeName = "ComputedPropertyName"; | ||
ComputedPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedPropertyName" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Expression }, | ||
ImportNamespace.typeName = "ImportNamespace"; | ||
ImportNamespace.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportNamespace" }, | ||
{ name: "defaultBinding", type: Maybe(BindingIdentifier) }, | ||
{ name: "namespaceBinding", type: BindingIdentifier }, | ||
{ name: "moduleSpecifier", type: STRING } | ||
]; | ||
StaticPropertyName.typeName = "StaticPropertyName"; | ||
StaticPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticPropertyName" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "value", type: STRING }, | ||
ImportSpecifier.typeName = "ImportSpecifier"; | ||
ImportSpecifier.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ImportSpecifier" }, | ||
{ name: "name", type: Maybe(STRING) }, | ||
{ name: "binding", type: BindingIdentifier } | ||
]; | ||
LabeledStatement.typeName = "LabeledStatement"; | ||
LabeledStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LabeledStatement" }, | ||
{ name: "label", type: STRING }, | ||
{ name: "body", type: Statement } | ||
]; | ||
LiteralBooleanExpression.typeName = "LiteralBooleanExpression"; | ||
LiteralBooleanExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralBooleanExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "value", type: BOOLEAN }, | ||
{ name: "value", type: BOOLEAN } | ||
]; | ||
@@ -397,4 +578,3 @@ | ||
LiteralInfinityExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralInfinityExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralInfinityExpression" } | ||
]; | ||
@@ -404,4 +584,3 @@ | ||
LiteralNullExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralNullExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralNullExpression" } | ||
]; | ||
@@ -412,4 +591,3 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralNumericExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "value", type: DOUBLE }, | ||
{ name: "value", type: DOUBLE } | ||
]; | ||
@@ -420,5 +598,8 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralRegExpExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "pattern", type: STRING }, | ||
{ name: "flags", type: STRING }, | ||
{ name: "global", type: BOOLEAN }, | ||
{ name: "ignoreCase", type: BOOLEAN }, | ||
{ name: "multiLine", type: BOOLEAN }, | ||
{ name: "sticky", type: BOOLEAN }, | ||
{ name: "unicode", type: BOOLEAN } | ||
]; | ||
@@ -429,87 +610,19 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LiteralStringExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "value", type: STRING }, | ||
{ name: "value", type: STRING } | ||
]; | ||
ArrayExpression.typeName = "ArrayExpression"; | ||
ArrayExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrayExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "elements", type: List(Maybe(Union(SpreadElement, Expression))) }, | ||
]; | ||
ArrowExpression.typeName = "ArrowExpression"; | ||
ArrowExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ArrowExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: Union(FunctionBody, Expression) }, | ||
]; | ||
AssignmentExpression.typeName = "AssignmentExpression"; | ||
AssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "AssignmentExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "binding", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "expression", type: Expression }, | ||
]; | ||
BinaryExpression.typeName = "BinaryExpression"; | ||
BinaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BinaryExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "operator", type: BinaryOperator }, | ||
{ name: "left", type: Expression }, | ||
{ name: "right", type: Expression }, | ||
]; | ||
CallExpression.typeName = "CallExpression"; | ||
CallExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CallExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "callee", type: Union(Expression, Super) }, | ||
{ name: "arguments", type: List(Union(SpreadElement, Expression)) }, | ||
]; | ||
CompoundAssignmentExpression.typeName = "CompoundAssignmentExpression"; | ||
CompoundAssignmentExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CompoundAssignmentExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "operator", type: CompoundAssignmentOperator }, | ||
{ name: "binding", type: Union(BindingIdentifier, MemberExpression) }, | ||
{ name: "expression", type: Expression }, | ||
]; | ||
ComputedMemberExpression.typeName = "ComputedMemberExpression"; | ||
ComputedMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ComputedMemberExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "expression", type: Expression }, | ||
]; | ||
ConditionalExpression.typeName = "ConditionalExpression"; | ||
ConditionalExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ConditionalExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Expression }, | ||
{ name: "alternate", type: Expression }, | ||
]; | ||
FunctionExpression.typeName = "FunctionExpression"; | ||
FunctionExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
Method.typeName = "Method"; | ||
Method.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Method" }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: Maybe(BindingIdentifier) }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody }, | ||
{ name: "body", type: FunctionBody } | ||
]; | ||
IdentifierExpression.typeName = "IdentifierExpression"; | ||
IdentifierExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IdentifierExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "name", type: STRING }, | ||
Module.typeName = "Module"; | ||
Module.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Module" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "items", type: List(Union(ExportDeclaration, ImportDeclaration, Statement)) } | ||
]; | ||
@@ -520,5 +633,4 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "NewExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "callee", type: Expression }, | ||
{ name: "arguments", type: List(Union(SpreadElement, Expression)) }, | ||
{ name: "arguments", type: List(Union(Expression, SpreadElement)) } | ||
]; | ||
@@ -528,172 +640,99 @@ | ||
NewTargetExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "NewTargetExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "NewTargetExpression" } | ||
]; | ||
ObjectExpression.typeName = "ObjectExpression"; | ||
ObjectExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "properties", type: List(ObjectProperty) }, | ||
ObjectAssignmentTarget.typeName = "ObjectAssignmentTarget"; | ||
ObjectAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectAssignmentTarget" }, | ||
{ name: "properties", type: List(AssignmentTargetProperty) } | ||
]; | ||
UnaryExpression.typeName = "UnaryExpression"; | ||
UnaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UnaryExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "operator", type: UnaryOperator }, | ||
{ name: "operand", type: Expression }, | ||
ObjectBinding.typeName = "ObjectBinding"; | ||
ObjectBinding.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectBinding" }, | ||
{ name: "properties", type: List(BindingProperty) } | ||
]; | ||
StaticMemberExpression.typeName = "StaticMemberExpression"; | ||
StaticMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticMemberExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "property", type: STRING }, | ||
ObjectExpression.typeName = "ObjectExpression"; | ||
ObjectExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ObjectExpression" }, | ||
{ name: "properties", type: List(ObjectProperty) } | ||
]; | ||
TemplateExpression.typeName = "TemplateExpression"; | ||
TemplateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "tag", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(Union(Expression, TemplateElement)) }, | ||
ReturnStatement.typeName = "ReturnStatement"; | ||
ReturnStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ReturnStatement" }, | ||
{ name: "expression", type: Maybe(Expression) } | ||
]; | ||
ThisExpression.typeName = "ThisExpression"; | ||
ThisExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ThisExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
Script.typeName = "Script"; | ||
Script.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Script" }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) } | ||
]; | ||
UpdateExpression.typeName = "UpdateExpression"; | ||
UpdateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UpdateExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "isPrefix", type: BOOLEAN }, | ||
{ name: "operator", type: UpdateOperator }, | ||
{ name: "operand", type: Union(BindingIdentifier, MemberExpression) }, | ||
Setter.typeName = "Setter"; | ||
Setter.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Setter" }, | ||
{ name: "name", type: PropertyName }, | ||
{ name: "param", type: Union(BindingWithDefault, Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding))) }, | ||
{ name: "body", type: FunctionBody } | ||
]; | ||
YieldExpression.typeName = "YieldExpression"; | ||
YieldExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Maybe(Expression) }, | ||
ShorthandProperty.typeName = "ShorthandProperty"; | ||
ShorthandProperty.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ShorthandProperty" }, | ||
{ name: "name", type: IdentifierExpression } | ||
]; | ||
YieldGeneratorExpression.typeName = "YieldGeneratorExpression"; | ||
YieldGeneratorExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldGeneratorExpression" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Expression }, | ||
SpreadElement.typeName = "SpreadElement"; | ||
SpreadElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SpreadElement" }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
BlockStatement.typeName = "BlockStatement"; | ||
BlockStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BlockStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "block", type: Block }, | ||
StaticMemberAssignmentTarget.typeName = "StaticMemberAssignmentTarget"; | ||
StaticMemberAssignmentTarget.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticMemberAssignmentTarget" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "property", type: STRING } | ||
]; | ||
BreakStatement.typeName = "BreakStatement"; | ||
BreakStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "BreakStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "label", type: Maybe(STRING) }, | ||
StaticMemberExpression.typeName = "StaticMemberExpression"; | ||
StaticMemberExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticMemberExpression" }, | ||
{ name: "object", type: Union(Expression, Super) }, | ||
{ name: "property", type: STRING } | ||
]; | ||
ContinueStatement.typeName = "ContinueStatement"; | ||
ContinueStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ContinueStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "label", type: Maybe(STRING) }, | ||
StaticPropertyName.typeName = "StaticPropertyName"; | ||
StaticPropertyName.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "StaticPropertyName" }, | ||
{ name: "value", type: STRING } | ||
]; | ||
DebuggerStatement.typeName = "DebuggerStatement"; | ||
DebuggerStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DebuggerStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
Super.typeName = "Super"; | ||
Super.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Super" } | ||
]; | ||
DoWhileStatement.typeName = "DoWhileStatement"; | ||
DoWhileStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "DoWhileStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "body", type: Statement }, | ||
SwitchCase.typeName = "SwitchCase"; | ||
SwitchCase.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchCase" }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: List(Statement) } | ||
]; | ||
EmptyStatement.typeName = "EmptyStatement"; | ||
EmptyStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "EmptyStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
SwitchDefault.typeName = "SwitchDefault"; | ||
SwitchDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchDefault" }, | ||
{ name: "consequent", type: List(Statement) } | ||
]; | ||
ExpressionStatement.typeName = "ExpressionStatement"; | ||
ExpressionStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ExpressionStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Expression }, | ||
]; | ||
ForInStatement.typeName = "ForInStatement"; | ||
ForInStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForInStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "left", type: Union(VariableDeclaration, ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement }, | ||
]; | ||
ForOfStatement.typeName = "ForOfStatement"; | ||
ForOfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForOfStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "left", type: Union(VariableDeclaration, ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "right", type: Expression }, | ||
{ name: "body", type: Statement }, | ||
]; | ||
ForStatement.typeName = "ForStatement"; | ||
ForStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ForStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "init", type: Maybe(Union(VariableDeclaration, Expression)) }, | ||
{ name: "test", type: Maybe(Expression) }, | ||
{ name: "update", type: Maybe(Expression) }, | ||
{ name: "body", type: Statement }, | ||
]; | ||
IfStatement.typeName = "IfStatement"; | ||
IfStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "IfStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: Statement }, | ||
{ name: "alternate", type: Maybe(Statement) }, | ||
]; | ||
LabeledStatement.typeName = "LabeledStatement"; | ||
LabeledStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "LabeledStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "label", type: STRING }, | ||
{ name: "body", type: Statement }, | ||
]; | ||
ReturnStatement.typeName = "ReturnStatement"; | ||
ReturnStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ReturnStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Maybe(Expression) }, | ||
]; | ||
SwitchStatement.typeName = "SwitchStatement"; | ||
SwitchStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "discriminant", type: Expression }, | ||
{ name: "cases", type: List(SwitchCase) }, | ||
{ name: "cases", type: List(SwitchCase) } | ||
]; | ||
@@ -704,14 +743,30 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchStatementWithDefault" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "discriminant", type: Expression }, | ||
{ name: "preDefaultCases", type: List(SwitchCase) }, | ||
{ name: "defaultCase", type: SwitchDefault }, | ||
{ name: "postDefaultCases", type: List(SwitchCase) }, | ||
{ name: "postDefaultCases", type: List(SwitchCase) } | ||
]; | ||
TemplateElement.typeName = "TemplateElement"; | ||
TemplateElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateElement" }, | ||
{ name: "rawValue", type: STRING } | ||
]; | ||
TemplateExpression.typeName = "TemplateExpression"; | ||
TemplateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateExpression" }, | ||
{ name: "tag", type: Maybe(Expression) }, | ||
{ name: "elements", type: List(Union(Expression, TemplateElement)) } | ||
]; | ||
ThisExpression.typeName = "ThisExpression"; | ||
ThisExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ThisExpression" } | ||
]; | ||
ThrowStatement.typeName = "ThrowStatement"; | ||
ThrowStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "ThrowStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Expression }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
@@ -722,5 +777,4 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TryCatchStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "body", type: Block }, | ||
{ name: "catchClause", type: CatchClause }, | ||
{ name: "catchClause", type: CatchClause } | ||
]; | ||
@@ -731,21 +785,47 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TryFinallyStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "body", type: Block }, | ||
{ name: "catchClause", type: Maybe(CatchClause) }, | ||
{ name: "finalizer", type: Block }, | ||
{ name: "finalizer", type: Block } | ||
]; | ||
UnaryExpression.typeName = "UnaryExpression"; | ||
UnaryExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UnaryExpression" }, | ||
{ name: "operator", type: UnaryOperator }, | ||
{ name: "operand", type: Expression } | ||
]; | ||
UpdateExpression.typeName = "UpdateExpression"; | ||
UpdateExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "UpdateExpression" }, | ||
{ name: "isPrefix", type: BOOLEAN }, | ||
{ name: "operator", type: UpdateOperator }, | ||
{ name: "operand", type: Union(AssignmentTargetIdentifier, MemberAssignmentTarget) } | ||
]; | ||
VariableDeclaration.typeName = "VariableDeclaration"; | ||
VariableDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclaration" }, | ||
{ name: "kind", type: VariableDeclarationKind }, | ||
{ name: "declarators", type: List(VariableDeclarator) } | ||
]; | ||
VariableDeclarationStatement.typeName = "VariableDeclarationStatement"; | ||
VariableDeclarationStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclarationStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "declaration", type: VariableDeclaration }, | ||
{ name: "declaration", type: VariableDeclaration } | ||
]; | ||
VariableDeclarator.typeName = "VariableDeclarator"; | ||
VariableDeclarator.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclarator" }, | ||
{ name: "binding", type: Union(BindingIdentifier, Union(ArrayBinding, ObjectBinding)) }, | ||
{ name: "init", type: Maybe(Expression) } | ||
]; | ||
WhileStatement.typeName = "WhileStatement"; | ||
WhileStatement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "WhileStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "test", type: Expression }, | ||
{ name: "body", type: Statement }, | ||
{ name: "body", type: Statement } | ||
]; | ||
@@ -756,115 +836,19 @@ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "WithStatement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "object", type: Expression }, | ||
{ name: "body", type: Statement }, | ||
{ name: "body", type: Statement } | ||
]; | ||
Block.typeName = "Block"; | ||
Block.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Block" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "statements", type: List(Statement) }, | ||
YieldExpression.typeName = "YieldExpression"; | ||
YieldExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldExpression" }, | ||
{ name: "expression", type: Maybe(Expression) } | ||
]; | ||
CatchClause.typeName = "CatchClause"; | ||
CatchClause.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "CatchClause" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "binding", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "body", type: Block }, | ||
YieldGeneratorExpression.typeName = "YieldGeneratorExpression"; | ||
YieldGeneratorExpression.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "YieldGeneratorExpression" }, | ||
{ name: "expression", type: Expression } | ||
]; | ||
Directive.typeName = "Directive"; | ||
Directive.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Directive" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "rawValue", type: STRING }, | ||
]; | ||
FormalParameters.typeName = "FormalParameters"; | ||
FormalParameters.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FormalParameters" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "items", type: List(Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression, BindingWithDefault)) }, | ||
{ name: "rest", type: Maybe(BindingIdentifier) }, | ||
]; | ||
FunctionBody.typeName = "FunctionBody"; | ||
FunctionBody.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionBody" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) }, | ||
]; | ||
FunctionDeclaration.typeName = "FunctionDeclaration"; | ||
FunctionDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "FunctionDeclaration" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "isGenerator", type: BOOLEAN }, | ||
{ name: "name", type: BindingIdentifier }, | ||
{ name: "params", type: FormalParameters }, | ||
{ name: "body", type: FunctionBody }, | ||
]; | ||
Script.typeName = "Script"; | ||
Script.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Script" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "directives", type: List(Directive) }, | ||
{ name: "statements", type: List(Statement) }, | ||
]; | ||
SpreadElement.typeName = "SpreadElement"; | ||
SpreadElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SpreadElement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "expression", type: Expression }, | ||
]; | ||
Super.typeName = "Super"; | ||
Super.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "Super" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
]; | ||
SwitchCase.typeName = "SwitchCase"; | ||
SwitchCase.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchCase" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "test", type: Expression }, | ||
{ name: "consequent", type: List(Statement) }, | ||
]; | ||
SwitchDefault.typeName = "SwitchDefault"; | ||
SwitchDefault.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "SwitchDefault" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "consequent", type: List(Statement) }, | ||
]; | ||
TemplateElement.typeName = "TemplateElement"; | ||
TemplateElement.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "TemplateElement" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "rawValue", type: STRING }, | ||
]; | ||
VariableDeclaration.typeName = "VariableDeclaration"; | ||
VariableDeclaration.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclaration" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "kind", type: VariableDeclarationKind }, | ||
{ name: "declarators", type: List(VariableDeclarator) }, | ||
]; | ||
VariableDeclarator.typeName = "VariableDeclarator"; | ||
VariableDeclarator.fields = [ | ||
{ name: "type", type: Const(TYPE_INDICATOR), value: "VariableDeclarator" }, | ||
{ name: "loc", type: Maybe(SourceSpan) }, | ||
{ name: "binding", type: Union(ObjectBinding, ArrayBinding, BindingIdentifier, MemberExpression) }, | ||
{ name: "init", type: Maybe(Expression) }, | ||
]; | ||
return SPEC; | ||
}()); |
{ | ||
"name": "shift-spec", | ||
"version": "2015.2.1", | ||
"version": "2016.0.0", | ||
"description": "JavaScript representation of the Shift AST specification", | ||
@@ -30,3 +30,4 @@ "author": "Shape Security Labs", | ||
"devDependencies": { | ||
"shift-spec-idl": "2015.1.x" | ||
"shift-spec-consumer": "1.0.0", | ||
"shift-spec-idl": "2016.0.x" | ||
}, | ||
@@ -33,0 +34,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49926
2
3
739
1
0
1