From 34042ea63872550d93b2703cc60d894c0ae02318 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 12 Nov 2021 13:32:38 -0500 Subject: [PATCH] Editorial: Use internal spec value for param Using an ECMAScript string value to represent internal state may cause readers to incorrectly assume that the state is directly observable from ECMAScript code. Replace with a internal specification value in accordance with the latest practice in ECMA262 [1]. Modify the values so that they will be distinctive in the context of the specification in order to facilitate tool-assisted search (e.g. via the `grep` command-line utility or via "Ctrl+F" in a web browser). [1] https://github.com/tc39/ecma262/pull/2566 --- spec.emu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec.emu b/spec.emu index 5da2778..95177e1 100644 --- a/spec.emu +++ b/spec.emu @@ -14,7 +14,7 @@ contributors: "Jack Works"

Number.range(_start_, _end_, _option_)

- 1. Return ? CreateNumericRangeIterator(_start_, _end_, _option_, *"number"*). + 1. Return ? CreateNumericRangeIterator(_start_, _end_, _option_, ~number-range~).
@@ -23,7 +23,7 @@ contributors: "Jack Works"

BigInt.range(_start_, _end_, _option_)

- 1. Return ? CreateNumericRangeIterator(_start_, _end_, _option_, *"bigint"*). + 1. Return ? CreateNumericRangeIterator(_start_, _end_, _option_, ~bigint-range~).
@@ -33,9 +33,9 @@ contributors: "Jack Works"

CreateNumericRangeIterator(_start_, _end_, _option_, _type_)

1. If Type(_start_) is not _type_, throw a *TypeError* exception. - 1. Assert: _type_ is *"number"* or *"bigint"*. - 1. If _type_ is *"bigint"*, let _zero_ be *0n*, else let _zero_ be *0*. - 1. If _type_ is *"bigint"*, let _one_ be *1n*, else let _one_ be *1*. + 1. Assert: _type_ is ~number-range~ or ~bigint-range~. + 1. If _type_ is ~bigint-range~, let _zero_ be *0n*, else let _zero_ be *0*. + 1. If _type_ is ~bigint-range~, let _one_ be *1n*, else let _one_ be *1*. 1. Note: Allowing all kinds of number (number, bigint, decimals, ...) to range from a finite number to infinity. 1. If _end_ is not *+∞* or *-∞* and if Type(_end_) is not _type_, throw a *TypeError* exception. 1. If _start_ is *+∞* or *-∞*, throws a *RangeError* exception.