Skip to content

Commit 21aa456

Browse files
committed
Update spec for es2020
1 parent e517d6d commit 21aa456

File tree

2 files changed

+47
-10
lines changed

2 files changed

+47
-10
lines changed

attribute-order.conf

+18-3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ test
138138
declaration
139139

140140
[ExportAllFrom]
141+
name
141142
moduleSpecifier
142143

143144
[ExportDeclaration]
@@ -234,6 +235,9 @@ moduleSpecifier
234235
[ImportDeclaration]
235236
moduleSpecifier
236237

238+
[ImportExpression]
239+
source
240+
237241
[ImportNamespace]
238242
defaultBinding
239243
namespaceBinding
@@ -250,6 +254,10 @@ body
250254
label
251255
body
252256

257+
[LiteralBigIntExpression]
258+
bigint
259+
value
260+
253261
[LiteralBooleanExpression]
254262
value
255263

@@ -300,9 +308,9 @@ name
300308
callee
301309
arguments
302310

303-
[NewTargetExpression]
304-
305-
[ImportMetaExpression]
311+
[MetaProperty]
312+
meta
313+
property
306314

307315
[Node]
308316

@@ -319,6 +327,13 @@ properties
319327

320328
[ObjectProperty]
321329

330+
[OptionalChainingExpression]
331+
expression
332+
333+
[OptionalMemberExpression]
334+
object
335+
property
336+
322337
[Program]
323338

324339
[PropertyName]

spec.idl

+29-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ enum CompoundAssignmentOperator {
4747
};
4848
enum BinaryOperator {
4949
"==", "!=", "===", "!==", "<", "<=", ">", ">=", "in", "instanceof", "<<",
50-
">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&", "??", "?."
50+
">>", ">>>", "+", "-", "*", "/", "%", "**", ",", "||", "&&", "|", "^", "&", "??"
5151
};
5252
enum UnaryOperator { "+", "-", "!", "~", "typeof", "void", "delete" };
5353
enum UpdateOperator { "++", "--" };
@@ -255,8 +255,9 @@ interface ImportSpecifier : Node {
255255
attribute BindingIdentifier binding;
256256
};
257257

258-
// `export * FromClause;`
258+
// `export * FromClause;`, `export * as IdentifierName FromClause`
259259
interface ExportAllFrom : ExportDeclaration {
260+
attribute IdentifierName? name;
260261
attribute string moduleSpecifier;
261262
};
262263

@@ -349,6 +350,12 @@ interface StaticPropertyName : PropertyName {
349350

350351
// literals
351352

353+
// `BigIntLiteral`
354+
interface LiteralBigIntExpression : Expression {
355+
attribute string bigint;
356+
attribute double value;
357+
};
358+
352359
// `BooleanLiteral`
353360
interface LiteralBooleanExpression : Expression {
354361
attribute boolean value;
@@ -412,7 +419,7 @@ interface AssignmentExpression : Expression {
412419
attribute Expression expression;
413420
};
414421

415-
// `ExponentiationExpression`, `MultiplicativeExpression`, `AdditiveExpression`, `ShiftExpression`, `RelationalExpression`, `EqualityExpression`, `BitwiseANDExpression`, `BitwiseXORExpression`, `BitwiseORExpression`, `LogicalANDExpression`, `LogicalORExpression`, `CoalesceExpression`, `CoalesceExpressionHead`, `ShortCircuitExpression`, `OptionalExpression`
422+
// `ExponentiationExpression`, `MultiplicativeExpression`, `AdditiveExpression`, `ShiftExpression`, `RelationalExpression`, `EqualityExpression`, `BitwiseANDExpression`, `BitwiseXORExpression`, `BitwiseORExpression`, `LogicalANDExpression`, `LogicalORExpression`, `NullishCoalescingExpression`
416423
interface BinaryExpression : Expression {
417424
attribute BinaryOperator operator;
418425
// The expression before the operator.
@@ -459,19 +466,34 @@ FunctionExpression implements Function;
459466
interface IdentifierExpression : Expression { };
460467
IdentifierExpression implements VariableReference;
461468

469+
// `ImportExpression`
470+
interface ImportExpression : Expression {
471+
attribute Expression source;
472+
};
473+
474+
// `import.meta`, `new.target`
475+
interface MetaProperty: Expression {
476+
attribute Identifier meta;
477+
attribute Identifier property;
478+
};
479+
462480
interface NewExpression : Expression {
463481
attribute Expression callee;
464482
attribute Arguments arguments;
465483
};
466484

467-
interface NewTargetExpression : Expression { };
468-
469-
interface ImportMetaExpression: Expression { };
470-
471485
interface ObjectExpression : Expression {
472486
attribute ObjectProperty[] properties;
473487
};
474488

489+
interface OptionalChainingExpression: Expression {
490+
attribute Expression expression;
491+
};
492+
493+
interface OptionalMemberExpression: MemberExpression {
494+
attribute IdentifierName property;
495+
};
496+
475497
interface UnaryExpression : Expression {
476498
attribute UnaryOperator operator;
477499
attribute Expression operand;

0 commit comments

Comments
 (0)