Skip to content

Version 2020.0.0 #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: es2020
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion attribute-order.conf
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ test
declaration

[ExportAllFrom]
name
moduleSpecifier

[ExportDeclaration]
Expand Down Expand Up @@ -234,6 +235,9 @@ moduleSpecifier
[ImportDeclaration]
moduleSpecifier

[ImportExpression]
source

[ImportNamespace]
defaultBinding
namespaceBinding
Expand All @@ -250,6 +254,10 @@ body
label
body

[LiteralBigIntExpression]
bigint
value

[LiteralBooleanExpression]
value

Expand Down Expand Up @@ -300,7 +308,9 @@ name
callee
arguments

[NewTargetExpression]
[MetaProperty]
meta
property

[Node]

Expand All @@ -317,6 +327,13 @@ properties

[ObjectProperty]

[OptionalChainingExpression]
expression

[OptionalMemberExpression]
object
property

[Program]

[PropertyName]
Expand Down
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shift-spec-idl",
"version": "2019.0.0",
"version": "2020.0.0",
"description": "Shift AST specification IDL files",
"author": "Shape Security",
"homepage": "https://github.com/shapesecurity/shift-spec",
Expand Down
34 changes: 29 additions & 5 deletions spec.idl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ enum CompoundAssignmentOperator {
};
enum BinaryOperator {
"==", "!=", "===", "!==", "<", "<=", ">", ">=", "in", "instanceof", "<<",
">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&"
">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&", "??"
};
enum UnaryOperator { "+", "-", "!", "~", "typeof", "void", "delete" };
enum UpdateOperator { "++", "--" };
Expand Down Expand Up @@ -255,8 +255,9 @@ interface ImportSpecifier : Node {
attribute BindingIdentifier binding;
};

// `export * FromClause;`
// `export * FromClause;`, `export * as IdentifierName FromClause`
interface ExportAllFrom : ExportDeclaration {
attribute IdentifierName? name;
attribute string moduleSpecifier;
};

Expand Down Expand Up @@ -349,6 +350,12 @@ interface StaticPropertyName : PropertyName {

// literals

// `BigIntLiteral`
interface LiteralBigIntExpression : Expression {
attribute string bigint;
attribute double value;
};

// `BooleanLiteral`
interface LiteralBooleanExpression : Expression {
attribute boolean value;
Expand Down Expand Up @@ -412,7 +419,7 @@ interface AssignmentExpression : Expression {
attribute Expression expression;
};

// `ExponentiationExpression`, `MultiplicativeExpression`, `AdditiveExpression`, `ShiftExpression`, `RelationalExpression`, `EqualityExpression`, `BitwiseANDExpression`, `BitwiseXORExpression`, `BitwiseORExpression`, `LogicalANDExpression`, `LogicalORExpression`
// `ExponentiationExpression`, `MultiplicativeExpression`, `AdditiveExpression`, `ShiftExpression`, `RelationalExpression`, `EqualityExpression`, `BitwiseANDExpression`, `BitwiseXORExpression`, `BitwiseORExpression`, `LogicalANDExpression`, `LogicalORExpression`, `NullishCoalescingExpression`
interface BinaryExpression : Expression {
attribute BinaryOperator operator;
// The expression before the operator.
Expand Down Expand Up @@ -459,17 +466,34 @@ FunctionExpression implements Function;
interface IdentifierExpression : Expression { };
IdentifierExpression implements VariableReference;

// `ImportExpression`
interface ImportExpression : Expression {
attribute Expression source;
};

// `import.meta`, `new.target`
interface MetaProperty: Expression {
attribute Identifier meta;
attribute Identifier property;
};

interface NewExpression : Expression {
attribute Expression callee;
attribute Arguments arguments;
};

interface NewTargetExpression : Expression { };

interface ObjectExpression : Expression {
attribute ObjectProperty[] properties;
};

interface OptionalChainingExpression: Expression {
attribute Expression expression;
};

interface OptionalMemberExpression: MemberExpression {
attribute IdentifierName property;
};

interface UnaryExpression : Expression {
attribute UnaryOperator operator;
attribute Expression operand;
Expand Down