add noStrict flag to yield-as-binding-id cases (#3551)

This commit is contained in:
Huáng Jùnliàng 2022-06-09 03:01:21 -04:00 committed by GitHub
parent b2f7dc1194
commit 79e3bc5176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 346 additions and 18 deletions

View File

@ -0,0 +1,31 @@
// Copyright (C) 2022 Chengzhong Wu. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Decorator @ DecoratorCallExpression
info: |
DecoratorCallExpression[Yield, Await] :
DecoratorMemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
DecoratorMemberExpression[Yield, Await] :
IdentifierReference[?Yield, ?Await]
PrivateIdentifier
DecoratorMemberExpression[?Yield, ?Await] . IdentifierName
IdentifierReference[Yield, Await] :
[~Yield] yield
...
template: syntax/valid
flags: [noStrict]
---*/
//- setup
function decorator() {
return () => {};
}
var yield = decorator;
//- decorators
@yield()

View File

@ -30,7 +30,6 @@ var \u{6F} = decorator;
var \u2118 = decorator;
var ZW_\u200C_NJ = decorator;
var ZW_\u200D_J = decorator;
var yield = decorator;
var await = decorator;
//- decorators
@ -40,5 +39,4 @@ var await = decorator;
@\u2118()
@ZW_\u200C_NJ()
@ZW_\u200D_J()
@yield()
@await()

View File

@ -0,0 +1,19 @@
// Copyright (C) 2022 Chengzhong Wu. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Decorator @ DecoratorMemberExpression
info: |
IdentifierReference[Yield, Await] :
[~Yield] yield
...
template: syntax/valid
flags: [noStrict]
---*/
//- setup
function yield() {}
//- decorators
@yield

View File

@ -19,7 +19,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
//- decorators
@ -29,5 +28,4 @@ function await() {}
@\u2118
@ZW_\u200C_NJ
@ZW_\u200D_J
@yield
@await

View File

@ -0,0 +1,37 @@
// Copyright (C) 2022 Chengzhong Wu. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Decorator @ DecoratorParenthesizedExpression
info: |
DecoratorParenthesizedExpression[Yield, Await] :
( Expression[+In, ?Yield, ?Await] )
PrimaryExpression[Yield, Await] :
this
IdentifierReference[?Yield, ?Await]
Literal
ArrayLiteral[?Yield, ?Await]
ObjectLiteral[?Yield, ?Await]
FunctionExpression
ClassExpression[?Yield, ?Await]
GeneratorExpression
AsyncFunctionExpression
AsyncGeneratorExpression
RegularExpressionLiteral
TemplateLiteral[?Yield, ?Await, ~Tagged]
CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
IdentifierReference[Yield, Await] :
[~Yield] yield
...
template: syntax/valid
flags: [noStrict]
---*/
//- setup
function yield() {}
//- decorators
@(yield)

View File

@ -33,7 +33,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
//- decorators
@ -43,5 +42,4 @@ function await() {}
@(\u2118)
@(ZW_\u200C_NJ)
@(ZW_\u200D_J)
@(yield)
@(await)

View File

@ -0,0 +1,44 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-call-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-expr-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorCallExpression (Valid syntax for decorator on class expression)
esid: prod-ClassExpression
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassExpression[Yield, Await] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await]opt ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
DecoratorCallExpression[Yield, Await] :
DecoratorMemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
DecoratorMemberExpression[Yield, Await] :
IdentifierReference[?Yield, ?Await]
PrivateIdentifier
DecoratorMemberExpression[?Yield, ?Await] . IdentifierName
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function decorator() {
return () => {};
}
var yield = decorator;
var C = @yield() class {};

View File

@ -43,7 +43,6 @@ var \u{6F} = decorator;
var \u2118 = decorator;
var ZW_\u200C_NJ = decorator;
var ZW_\u200D_J = decorator;
var yield = decorator;
var await = decorator;
@ -54,5 +53,4 @@ var C = @$()
@\u2118()
@ZW_\u200C_NJ()
@ZW_\u200D_J()
@yield()
@await() class {};

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-member-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-expr-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorMemberExpression (Valid syntax for decorator on class expression)
esid: prod-ClassExpression
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassExpression[Yield, Await] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await]opt ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function yield() {}
var C = @yield class {};

View File

@ -33,7 +33,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
@ -44,5 +43,4 @@ var C = @$
@\u2118
@ZW_\u200C_NJ
@ZW_\u200D_J
@yield
@await class {};

View File

@ -0,0 +1,51 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-parenthesized-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-expr-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorParenthesizedExpression (Valid syntax for decorator on class expression)
esid: prod-ClassExpression
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassExpression[Yield, Await] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await]opt ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
DecoratorParenthesizedExpression[Yield, Await] :
( Expression[+In, ?Yield, ?Await] )
PrimaryExpression[Yield, Await] :
this
IdentifierReference[?Yield, ?Await]
Literal
ArrayLiteral[?Yield, ?Await]
ObjectLiteral[?Yield, ?Await]
FunctionExpression
ClassExpression[?Yield, ?Await]
GeneratorExpression
AsyncFunctionExpression
AsyncGeneratorExpression
RegularExpressionLiteral
TemplateLiteral[?Yield, ?Await, ~Tagged]
CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function yield() {}
var C = @(yield) class {};

View File

@ -46,7 +46,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
@ -57,5 +56,4 @@ var C = @($)
@(\u2118)
@(ZW_\u200C_NJ)
@(ZW_\u200D_J)
@(yield)
@(await) class {};

View File

@ -0,0 +1,45 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-call-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-decl-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorCallExpression (Valid syntax for decorator on class.)
esid: prod-ClassDeclaration
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassDeclaration[Yield, Await, Default] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await] ClassTail[?Yield, ?Await]
[+Default] DecoratorList[?Yield, ?Await]opt class ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
DecoratorCallExpression[Yield, Await] :
DecoratorMemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
DecoratorMemberExpression[Yield, Await] :
IdentifierReference[?Yield, ?Await]
PrivateIdentifier
DecoratorMemberExpression[?Yield, ?Await] . IdentifierName
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function decorator() {
return () => {};
}
var yield = decorator;
@yield() class C {}

View File

@ -44,7 +44,6 @@ var \u{6F} = decorator;
var \u2118 = decorator;
var ZW_\u200C_NJ = decorator;
var ZW_\u200D_J = decorator;
var yield = decorator;
var await = decorator;
@ -55,5 +54,4 @@ var await = decorator;
@\u2118()
@ZW_\u200C_NJ()
@ZW_\u200D_J()
@yield()
@await() class C {}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-member-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-decl-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorMemberExpression (Valid syntax for decorator on class.)
esid: prod-ClassDeclaration
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassDeclaration[Yield, Await, Default] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await] ClassTail[?Yield, ?Await]
[+Default] DecoratorList[?Yield, ?Await]opt class ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function yield() {}
@yield class C {}

View File

@ -34,7 +34,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
@ -45,5 +44,4 @@ function await() {}
@\u2118
@ZW_\u200C_NJ
@ZW_\u200D_J
@yield
@await class C {}

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/decorator/decorator-parenthesized-expr-identifier-reference-yield.case
// - src/decorator/syntax/valid/cls-decl-decorators-valid-syntax.template
/*---
description: Decorator @ DecoratorParenthesizedExpression (Valid syntax for decorator on class.)
esid: prod-ClassDeclaration
features: [class, decorators]
flags: [generated, noStrict]
info: |
ClassDeclaration[Yield, Await, Default] :
DecoratorList[?Yield, ?Await]opt class BindingIdentifier[?Yield, ?Await] ClassTail[?Yield, ?Await]
[+Default] DecoratorList[?Yield, ?Await]opt class ClassTail[?Yield, ?Await]
DecoratorList[Yield, Await] :
DecoratorList[?Yield, ?Await]opt Decorator[?Yield, ?Await]
Decorator[Yield, Await] :
@ DecoratorMemberExpression[?Yield, ?Await]
@ DecoratorParenthesizedExpression[?Yield, ?Await]
@ DecoratorCallExpression[?Yield, ?Await]
...
DecoratorParenthesizedExpression[Yield, Await] :
( Expression[+In, ?Yield, ?Await] )
PrimaryExpression[Yield, Await] :
this
IdentifierReference[?Yield, ?Await]
Literal
ArrayLiteral[?Yield, ?Await]
ObjectLiteral[?Yield, ?Await]
FunctionExpression
ClassExpression[?Yield, ?Await]
GeneratorExpression
AsyncFunctionExpression
AsyncGeneratorExpression
RegularExpressionLiteral
TemplateLiteral[?Yield, ?Await, ~Tagged]
CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
IdentifierReference[Yield, Await] :
[~Yield] yield
...
---*/
function yield() {}
@(yield) class C {}

View File

@ -47,7 +47,6 @@ function \u{6F}() {}
function \u2118() {}
function ZW_\u200C_NJ() {}
function ZW_\u200D_J() {}
function yield() {}
function await() {}
@ -58,5 +57,4 @@ function await() {}
@(\u2118)
@(ZW_\u200C_NJ)
@(ZW_\u200D_J)
@(yield)
@(await) class C {}