?um/p1-90`
在文法中,yield 和 await 被允许作为
let
await 0;
yield 或 await
之外任一
The syntax-directed operation StringValue takes no arguments and returns 一个 String. It is defined piecewise over the following productions:
对
在yield 可以被用作标识符。对该
yield 的绑定。
在处理如下产生式的一个实例时
this 关键字
有关
false,返回 true,返回
数组元素可以在元素列表的开头、中间或结尾被省略。每当元素列表中的一个逗号
前面没有
The syntax-directed operation ArrayAccumulation takes arguments array (一个 Array) and nextIndex (一个
使用
对象初始化器是一种描述 Object 初始化的表达式,其书写形式类似字面量。它
是一个由 0 个或多个
在某些上下文中,
该产生式存在是为了让
The syntax-directed operation IsComputedPropertyKey takes no arguments and returns 一个 Boolean. It is defined piecewise over the following productions:
The syntax-directed operation PropertyDefinitionNodes takes no arguments and returns 一个 Parse Node 列表. It is defined piecewise over the following productions:
The syntax-directed operation PropertyNameList takes no arguments and returns 一个 String 列表. It is defined piecewise over the following productions:
The syntax-directed operation PropertyDefinitionEvaluation takes argument object (一个 Object) and returns 要么是一个
有关
有关
有关
有关
有关
见
The abstract operation IsValidRegularExpressionLiteral takes argument literal (一个
d、g、i、m、s、u、v 或 y
之外的任何码点,返回 u,令 u 为 v,令 v 为 The syntax-directed operation TemplateStrings takes argument raw (一个 Boolean) and returns 一个由 String 或
The abstract operation TemplateString takes arguments templateToken (一个
如果 raw 为
The abstract operation GetTemplateObject takes argument templateLiteral (一个 Parse Node) and returns 一个 Array. It performs the following steps when called:
模板对象的创建不可能导致一个突然完成。
一个
本规范未来版本可能会定义模板对象的额外不可枚举属性。
The syntax-directed operation SubstitutionEvaluation takes no arguments and returns 要么是一个
应用于 String.prototype.concat,
而不是 + 运算符。
应用于 String.prototype.concat,
而不是 + 运算符。
应用于 String.prototype.concat,
而不是 + 运算符。
该算法不会对 delete 和 typeof 这样的运算符可以应用于带括号的表达式。
在处理如下产生式的一个实例时
该产生式存在是为了防止自动分号插入规则
(
a?.b
`c`
否则它会被解释为两条有效语句。其目的是与不使用可选链的类似代码保持一 致:
a.b
`c`
后者是一条有效语句,并且不会应用自动分号插入。
属性通过名称进行访问,使用点记法:
或方括号记法:
点记法可由如下语法转换解释:
其行为与下式完全相同
类似地
其行为与下式完全相同
其中 <identifier-name-string> 是
The abstract operation EvaluatePropertyAccessWithExpressionKey takes arguments baseValue (一个
a[b] = c 的情形下,它要等到对 c 求值之后才会执行。The abstract operation EvaluatePropertyAccessWithIdentifierKey takes arguments baseValue (一个
new 运算符The abstract operation EvaluateNew takes arguments constructExpr (a
执行步骤
The abstract operation EvaluateCall takes arguments func (一个
super 关键字super[b] = c 的情形下,它要等到对 c 求值之后才会执行。The abstract operation GetSuperConstructor takes no arguments and returns an Object or
The abstract operation MakeSuperPropertyReference takes arguments actualThis (一个
对实参列表求值会产生一个值列表。
The syntax-directed operation ArgumentListEvaluation takes no arguments and returns 要么是一个
?. 开始。The syntax-directed operation ChainEvaluation takes arguments baseValue (一个
The abstract operation EvaluateImportCall takes argument specifierExpression (一个 Parse Node) and optional argument optionsExpression (一个 Parse Node) and returns 要么是一个
The abstract operation ContinueDynamicImport takes arguments promiseCapability (一个 import()
带标签模板是一种函数调用,其中调用的参数来自一个
The host-defined abstract operation HostGetImportMetaProperties takes argument moduleRecord (一个 Module import.meta 返回的对象提供
HostGetImportMetaProperties 的默认实现是返回一个新的空列表。
The host-defined abstract operation HostFinalizeImportMeta takes arguments importMeta (一个 Object) and moduleRecord (一个 Module import.meta 返回的对象。
大多数
HostFinalizeImportMeta 的默认实现是返回
delete 运算符
如果所派生的
并且
最后一条规则意味着,像 delete (((foo))) 这样的表达式会由于递归应
用第一条规则而产生
当一个 delete 运算符出现在delete 运算符出现在
void 运算符即使不会使用其值,也必须调用
typeof 运算符+ 运算符一元 + 运算符会将其操作数转换为
- 运算符
一元 - 运算符会将其操作数转换为一个数值,然后对其取反。对
~ )! )* 运算符执行乘法,产生其操作数的乘积。/ 运算符执行除法,产生其操作数的商。% 运算符产生其操作数在一个隐含除法中的余数。+ )加法运算符要么执行字符串串接,要么执行数值加法。
- )- 运算符执行减法,产生其操作数的差。
<< )对左操作数执行按位左移,移位的位数由右操作数指定。
>> )对左操作数执行符号扩展的按位右移,移位的位数由右操作数指定。
>>> )对左操作数执行零扩展的按位右移,移位的位数由右操作数指定。
对关系运算符求值的结果总是
[In] 文法参数是必需的,以避免将关系表达式中的 in 运算符与
for 语句中的 in 运算符混淆。
The abstract operation InstanceofOperator takes arguments value (一个
步骤 instanceof 运算符的语义。如果一个对象没有定义或继承
instanceof 语义。
对相等运算符求值的结果总是
相等运算符保持以下不变量:
A != B 等价于 !(A == B)。
A == B 等价于 B == A,除了 A 和 B 的求值顺序不同之外。
相等运算符并不总是具有传递性。例如,可能存在两个不同的 String 对象,
它们都表示相同的 String 值;每个 String 对象都会被 == 运算符视为与该
String 值相等,但这两个 String 对象彼此并不相等。例如:
new String("a") == "a" 和 "a" == new String("a") 都为 new String("a") == new String("a") 为 String 的比较使用的是对码元值序列的简单相等测试。不会尝试使用 Unicode 规范中定义的、更复杂且更偏语义化的字符或字符串相等与排序定义。因此,根据 Unicode 标准属于规范相等的 String 值,测试结果可能并不相等。实际上,该算 法假定两个 String 都已经处于规范化形式。
&& 或 || 运算符所产生的值不一定是
? : )
ECMAScript 中
| assignmentOpText | opText |
|---|---|
**= | ** |
*= | * |
/= | / |
%= | % |
+= | + |
-= | - |
<<= | << |
>>= | >> |
>>>= | >>> |
&= | & |
^= | ^ |
|= | | |
The abstract operation ApplyStringOrNumericBinaryOperator takes arguments lVal (一个 **、*、/、%、+、-、<<、>>、>>>、&、^ 或 |), and rVal (一个
+,那么**,返回 ? /,返回 ? %,返回 ? >>>,返回 ? | opText | operation |
|---|---|
* | |
+ | |
- | |
<< | |
>> | |
& | |
^ | |
| | |
| opText | operation |
|---|---|
** | |
* | |
/ | |
% | |
+ | |
- | |
<< | |
>> | |
>>> | |
& | |
^ | |
| | |
在步骤
步骤
The abstract operation EvaluateStringOrNumericBinaryExpression takes arguments leftOperand (a Parse Node), opText (**, *, /, %, +, -, <<, >>, >>>, &, ^, or |), and rightOperand (a Parse Node) and returns either a normal completion containing either a String, a BigInt, or a Number, or an abrupt completion. It performs the following steps when called:
在某些情况下,当处理如下产生式的一个实例时
The syntax-directed operation DestructuringAssignmentEvaluation takes argument value (一个
The syntax-directed operation PropertyDestructuringAssignmentEvaluation takes argument value (一个
The syntax-directed operation RestDestructuringAssignmentEvaluation takes arguments value (一个
The syntax-directed operation IteratorDestructuringAssignmentEvaluation takes argument iteratorRecord (一个
从左到右的求值顺序通过如下方式得到保持:对于不是解构模式的
The syntax-directed operation KeyedDestructuringAssignmentEvaluation takes arguments value (一个
, )即使不会使用其值,也必须调用