Skip to content

Commit 1ae5bc4

Browse files
committed
[spec] properly get the numeric value of a code point
1 parent 2481aa8 commit 1ae5bc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec.emu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ contributors:
3333
1. For each code point _c_ in _cpList_, do
3434
1. If _escaped_ is the empty String, and _c_ is matched by |DecimalDigit| or |AsciiLetter|, then
3535
1. NOTE: Escaping a leading digit ensures that output corresponds with pattern text which may be used after a `\0` character escape or a |DecimalEscape| such as `\1` and still match _S_ rather than be interpreted as an extension of the preceding escape sequence. Escaping a leading ASCII letter does the same for the context after `\c`.
36-
1. Let _hex_ be Number::toString(𝔽(_c_), 16).
36+
1. Let _numericValue_ be the numeric value of _c_.
37+
1. Let _hex_ be Number::toString(𝔽(_numericValue_), 16).
3738
1. Assert: The length of _hex_ is 2.
3839
1. Set _escaped_ to the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), *"x"*, and _hex_.
3940
1. Else,

0 commit comments

Comments
 (0)