Skip to content

Commit 1627c2b

Browse files
author
llgoer
committed
ES2019更改为ES2020
1 parent 00ea3ad commit 1627c2b

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -250,85 +250,85 @@ make test2
250250

251251
### 3.1 语言支持
252252

253-
#### 3.1.1 ES2019支持
253+
#### 3.1.1 ES2020支持
254254

255-
The ES2019 specification [2](#FOOT2) is almost fully supported including the Annex B (legacy web compatibility) and the Unicode related features. The following features are not supported yet:
255+
包含Annex B (遗留Web兼容)和Unicode相关功能的ES2020规范 [2](#FOOT2) 已经基本支持。 目前尚未支持以下功能:
256256

257-
* Realms (althougth the C API supports different runtimes and contexts)
257+
* Realms (尽管C API支持不同的运行时和上下文)
258258
* Tail calls[3](#FOOT3)
259259

260260
#### 3.1.2 JSON
261261

262-
The JSON parser is currently more tolerant than the specification.
262+
JSON解析器目前比规范支持范围更宽.
263263

264264
#### 3.1.3 ECMA402
265265

266-
ECMA402 (Internationalization API) is not supported.
266+
ECMA402 (国际化API)尚未支持.
267267

268268
#### 3.1.4 扩展
269269

270-
* The directive `"use strip"` indicates that the debug information (including the source code of the functions) should not be retained to save memory. As `"use strict"`, the directive can be global to a script or local to a function.
271-
* The first line of a script beginning with `#!` is ignored.
270+
* 指令 `"use strip"` 不保留调试信息 (包括函数源代码) 以节省内存。 `"use strict"`指令可以应用全局脚本,或者特定函数。
271+
* 脚本开头第一行 `#!` 会被忽略。
272272

273273
#### 3.1.5 数学扩展
274274

275-
The mathematical extensions are available in the `qjsbn` version and are fully backward compatible with standard Javascript. See `jsbignum.pdf` for more information.
275+
数学扩展在`qjsbn` 版本中可用,并且完全向后兼容标准Javascript. 查看`jsbignum.pdf`获取更多信息。
276276

277-
* The `BigInt` (big integers) TC39 proposal is supported.
278-
* `BigFloat` support: arbitrary large floating point numbers in base 2.
279-
* Operator overloading.
280-
* The directive `"use bigint"` enables the bigint mode where integers are `BigInt` by default.
281-
* The directive `"use math"` enables the math mode where the division and power operators on integers produce fractions. Floating point literals are `BigFloat` by default and integers are `BigInt` by default.
277+
* `BigInt` (大整数) TC39已经支持。
278+
* `BigFloat` 支持: 基数2中任意大浮点数。
279+
* 运算符重载。
280+
* 指令`"use bigint"`启用bigint模式, `BigInt`默认情况下为整数。
281+
* 指令`"use math"`启用数学模式,其中整数上的除法和幂运算符产生分数。BigFloat默认情况下,浮点文字是默认值,整数是BigInt默认值。
282282

283283
### 3.2 模块
284284

285-
ES6 modules are fully supported. The default name resolution is the following:
285+
ES6模块完全支持。默认名称解析规则如下:
286286

287-
* Module names with a leading `.` or `..` are relative to the current module path.
288-
* Module names without a leading `.` or `..` are system modules, such as `std` or `os`.
289-
* Module names ending with `.so` are native modules using the QuickJS C API.
287+
* 模块名称带有前导`.``..`是相对于当前模块的路径。
288+
* 模块名称没有前导`.``..`是系统模块,例如`std``os`
289+
* 模块名称以`.so`结尾,是使用QuickJS C API的原生模块。
290290

291291
### 3.3 标准库
292292

293-
The standard library is included by default in the command line interpreter. It contains the two modules `std` and `os` and a few global objects.
293+
默认情况下,标准库包含在命令行解释器中。 它包含两个模块`std``os`以及一些全局对象.
294294

295295
#### 3.3.1 全局对象
296296

297297
`scriptArgs`
298298

299-
Provides the command line arguments. The first argument is the script name.
299+
提供命令行参数。第一个参数是脚本名称。
300300

301301
`print(...args)`
302302

303-
Print the arguments separated by spaces and a trailing newline.
303+
打印由空格和尾随换行符分隔的参数。
304304

305305
`console.log(...args)`
306306

307-
Same as print().
307+
与print()相同。
308308

309309
#### 3.3.2 `std` 模块
310310

311-
The `std` module provides wrappers to the libc stdlib.h and stdio.h and a few other utilities.
311+
`std`模块为libc提供包装器stdlib.h和stdio.h和其他一些实用程序。
312312

313-
Available exports:
313+
可用出口:
314314

315315
`exit(n)`
316316

317-
Exit the process.
317+
退出进程。
318318

319319
`evalScript(str)`
320320

321-
Evaluate the string `str` as a script (global eval).
321+
将字符串`str`以脚本方式运行(全局eval)。
322322

323323
`loadScript(filename)`
324324

325-
Evaluate the file `filename` as a script (global eval).
325+
将文件`filename`以脚本方式运行(全局eval)。
326326

327327
`Error(errno)`
328328

329-
`std.Error` constructor. Error instances contain the field `errno` (error code) and `message` (result of `std.Error.strerror(errno)`).
329+
`std.Error` 构造函数。 错误实例包含字段`errno`(错误代码)和`message``std.Error.strerror(errno)`的结果)。
330330

331-
The constructor contains the following fields:
331+
构造函数包含以下字段:
332332

333333
`EINVAL`
334334

0 commit comments

Comments
 (0)