Skip to content

Commit 4ea0d70

Browse files
author
Bot
committed
Update gh-pages
1 parent 80e3cad commit 4ea0d70

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

index.html

+3-3
Large diffs are not rendered by default.

multipage/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<li><span>Jump to search box</span><code>/</code></li>
9595
<li><span>Toggle pinning of the current clause</span><code>p</code></li>
9696
<li><span>Jump to <i>n</i>th pin</span><code>1-9</code></li>
97-
</ul></div><div id='spec-container'><h1 class="version">Draft ECMA-262 / February 27, 2025</h1>
97+
</ul></div><div id='spec-container'><h1 class="version">Draft ECMA-262 / February 28, 2025</h1>
9898
<h1 class="title">ECMAScript® 2025 Language&nbsp;Specification</h1>
9999
<p><img src="../img/ecma-logo.svg" id="ecma-logo" alt="Ecma International logo"></p>
100100
<div id="metadata-block">

multipage/text-processing.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3594,9 +3594,9 @@ <h1><span class="secnum">22.2.5.1</span> RegExp.escape ( <var>S</var> )</h1>
35943594

35953595
<emu-clause id="sec-encodeforregexpescape" type="abstract operation" aoid="EncodeForRegExpEscape">
35963596
<h1><span class="secnum">22.2.5.1.1</span> EncodeForRegExpEscape ( <var>cp</var> )</h1>
3597-
<p>The abstract operation EncodeForRegExpEscape takes argument <var>cp</var> (a code point) and returns a String. It returns a String representing a <emu-nt id="_ref_23670"><a href="text-processing.html#prod-Pattern">Pattern</a></emu-nt> for matching <var>c</var>. If <var>c</var> is white space or an ASCII punctuator, the returned value is an escape sequence. Otherwise, the returned value <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_11839"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref> representation of <var>c</var> itself. It performs the following steps when called:</p>
3597+
<p>The abstract operation EncodeForRegExpEscape takes argument <var>cp</var> (a code point) and returns a String. It returns a String representing a <emu-nt id="_ref_23670"><a href="text-processing.html#prod-Pattern">Pattern</a></emu-nt> for matching <var>cp</var>. If <var>cp</var> is white space or an ASCII punctuator, the returned value is an escape sequence. Otherwise, the returned value <emu-xref href="#sec-ecmascript-language-types-string-type" id="_ref_11839"><a href="ecmascript-data-types-and-values.html#sec-ecmascript-language-types-string-type">is a String</a></emu-xref> representation of <var>cp</var> itself. It performs the following steps when called:</p>
35983598

3599-
<emu-alg><ol><li>If <var>cp</var> is matched by <emu-nt id="_ref_23671"><a href="text-processing.html#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt> or <var>cp</var> is U+002F (SOLIDUS), then<ol><li>Return the <emu-xref href="#string-concatenation" id="_ref_11840"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of 0x005C (REVERSE SOLIDUS) and <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11841"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li></ol></li><li>Else if <var>cp</var> is a code point listed in the “Code Point” column of <emu-xref href="#table-controlescape-code-point-values" id="_ref_698"><a href="text-processing.html#table-controlescape-code-point-values">Table 67</a></emu-xref>, then<ol><li>Return the <emu-xref href="#string-concatenation" id="_ref_11842"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains <var>c</var>.</li></ol></li><li>Let <var>otherPunctuators</var> be the <emu-xref href="#string-concatenation" id="_ref_11843"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <emu-val>",-=&lt;&gt;#&amp;!%:;@~'`"</emu-val> and the code unit 0x0022 (QUOTATION MARK).</li><li>Let <var>toEscape</var> be <emu-xref aoid="StringToCodePoints" id="_ref_11844"><a href="ecmascript-language-source-code.html#sec-stringtocodepoints">StringToCodePoints</a></emu-xref>(<var>otherPunctuators</var>).</li><li>If <var>toEscape</var> contains <var>cp</var>, <var>cp</var> is matched by either <emu-nt id="_ref_23672"><a href="ecmascript-language-lexical-grammar.html#prod-WhiteSpace">WhiteSpace</a></emu-nt> or <emu-nt id="_ref_23673"><a href="ecmascript-language-lexical-grammar.html#prod-LineTerminator">LineTerminator</a></emu-nt>, or <var>cp</var> has the same numeric value as a <emu-xref href="#leading-surrogate" id="_ref_11845"><a href="ecmascript-data-types-and-values.html#leading-surrogate">leading surrogate</a></emu-xref> or <emu-xref href="#trailing-surrogate" id="_ref_11846"><a href="ecmascript-data-types-and-values.html#trailing-surrogate">trailing surrogate</a></emu-xref>, then<ol><li>Let <var>cpNum</var> be the numeric value of <var>cp</var>.</li><li>If <var>cpNum</var> ≤ 0xFF, then<ol><li>Let <var>hex</var> be <emu-xref aoid="Number::toString" id="_ref_11847"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-tostring">Number::toString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_11848"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>cpNum</var>), 16).</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_11849"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of the code unit 0x005C (REVERSE SOLIDUS), <emu-val>"x"</emu-val>, and <emu-xref aoid="StringPad" id="_ref_11850"><a href="text-processing.html#sec-stringpad">StringPad</a></emu-xref>(<var>hex</var>, 2, <emu-val>"0"</emu-val>, <emu-const>start</emu-const>).</li></ol></li><li>Let <var>escaped</var> be the empty String.</li><li>Let <var>codeUnits</var> be <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11851"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li><li>For each code unit <var>cu</var> of <var>codeUnits</var>, do<ol><li>Set <var>escaped</var> to the <emu-xref href="#string-concatenation" id="_ref_11852"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>escaped</var> and <emu-xref aoid="UnicodeEscape" id="_ref_11853"><a href="structured-data.html#sec-unicodeescape">UnicodeEscape</a></emu-xref>(<var>cu</var>).</li></ol></li><li>Return <var>escaped</var>.</li></ol></li><li>Return <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11854"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li></ol></emu-alg>
3599+
<emu-alg><ol><li>If <var>cp</var> is matched by <emu-nt id="_ref_23671"><a href="text-processing.html#prod-SyntaxCharacter">SyntaxCharacter</a></emu-nt> or <var>cp</var> is U+002F (SOLIDUS), then<ol><li>Return the <emu-xref href="#string-concatenation" id="_ref_11840"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of 0x005C (REVERSE SOLIDUS) and <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11841"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li></ol></li><li>Else if <var>cp</var> is a code point listed in the “Code Point” column of <emu-xref href="#table-controlescape-code-point-values" id="_ref_698"><a href="text-processing.html#table-controlescape-code-point-values">Table 67</a></emu-xref>, then<ol><li>Return the <emu-xref href="#string-concatenation" id="_ref_11842"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains <var>cp</var>.</li></ol></li><li>Let <var>otherPunctuators</var> be the <emu-xref href="#string-concatenation" id="_ref_11843"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <emu-val>",-=&lt;&gt;#&amp;!%:;@~'`"</emu-val> and the code unit 0x0022 (QUOTATION MARK).</li><li>Let <var>toEscape</var> be <emu-xref aoid="StringToCodePoints" id="_ref_11844"><a href="ecmascript-language-source-code.html#sec-stringtocodepoints">StringToCodePoints</a></emu-xref>(<var>otherPunctuators</var>).</li><li>If <var>toEscape</var> contains <var>cp</var>, <var>cp</var> is matched by either <emu-nt id="_ref_23672"><a href="ecmascript-language-lexical-grammar.html#prod-WhiteSpace">WhiteSpace</a></emu-nt> or <emu-nt id="_ref_23673"><a href="ecmascript-language-lexical-grammar.html#prod-LineTerminator">LineTerminator</a></emu-nt>, or <var>cp</var> has the same numeric value as a <emu-xref href="#leading-surrogate" id="_ref_11845"><a href="ecmascript-data-types-and-values.html#leading-surrogate">leading surrogate</a></emu-xref> or <emu-xref href="#trailing-surrogate" id="_ref_11846"><a href="ecmascript-data-types-and-values.html#trailing-surrogate">trailing surrogate</a></emu-xref>, then<ol><li>Let <var>cpNum</var> be the numeric value of <var>cp</var>.</li><li>If <var>cpNum</var> ≤ 0xFF, then<ol><li>Let <var>hex</var> be <emu-xref aoid="Number::toString" id="_ref_11847"><a href="ecmascript-data-types-and-values.html#sec-numeric-types-number-tostring">Number::toString</a></emu-xref>(<emu-xref aoid="𝔽" id="_ref_11848"><a href="notational-conventions.html#%F0%9D%94%BD">𝔽</a></emu-xref>(<var>cpNum</var>), 16).</li><li>Return the <emu-xref href="#string-concatenation" id="_ref_11849"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of the code unit 0x005C (REVERSE SOLIDUS), <emu-val>"x"</emu-val>, and <emu-xref aoid="StringPad" id="_ref_11850"><a href="text-processing.html#sec-stringpad">StringPad</a></emu-xref>(<var>hex</var>, 2, <emu-val>"0"</emu-val>, <emu-const>start</emu-const>).</li></ol></li><li>Let <var>escaped</var> be the empty String.</li><li>Let <var>codeUnits</var> be <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11851"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li><li>For each code unit <var>cu</var> of <var>codeUnits</var>, do<ol><li>Set <var>escaped</var> to the <emu-xref href="#string-concatenation" id="_ref_11852"><a href="ecmascript-data-types-and-values.html#string-concatenation">string-concatenation</a></emu-xref> of <var>escaped</var> and <emu-xref aoid="UnicodeEscape" id="_ref_11853"><a href="structured-data.html#sec-unicodeescape">UnicodeEscape</a></emu-xref>(<var>cu</var>).</li></ol></li><li>Return <var>escaped</var>.</li></ol></li><li>Return <emu-xref aoid="UTF16EncodeCodePoint" id="_ref_11854"><a href="ecmascript-language-source-code.html#sec-utf16encodecodepoint">UTF16EncodeCodePoint</a></emu-xref>(<var>cp</var>).</li></ol></emu-alg>
36003600
</emu-clause>
36013601
</emu-clause>
36023602

0 commit comments

Comments
 (0)