Skip to content

Commit

Permalink
more consistent notation
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Apr 6, 2024
1 parent e8ea07f commit 89a747a
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -15997,7 +15997,7 @@ <h2>Syntax</h2>
<p>The components of a combining character sequence are treated as individual Unicode code points even though a user might think of the whole sequence as a single character.</p>
<emu-note>
<p>In string literals, regular expression literals, template literals and identifiers, any Unicode code point may also be expressed using Unicode escape sequences that explicitly express a code point's numeric value. Within a comment, such an escape sequence is effectively ignored as part of the comment.</p>
<p>ECMAScript differs from the Java programming language in the behaviour of Unicode escape sequences. In a Java program, if the Unicode escape sequence `\\u000A`, for example, occurs within a single-line comment, it is interpreted as a line terminator (Unicode code point U+000A is LINE FEED (LF)) and therefore the next code point is not part of the comment. Similarly, if the Unicode escape sequence `\\u000A` occurs within a string literal in a Java program, it is likewise interpreted as a line terminator, which is not allowed within a string literal—one must write `\\n` instead of `\\u000A` to cause a LINE FEED (LF) to be part of the String value of a string literal. In an ECMAScript program, a Unicode escape sequence occurring within a comment is never interpreted and therefore cannot contribute to termination of the comment. Similarly, a Unicode escape sequence occurring within a string literal in an ECMAScript program always contributes to the literal and is never interpreted as a line terminator or as a code point that might terminate the string literal.</p>
<p>ECMAScript differs from the Java programming language in the behaviour of Unicode escape sequences. In a Java program, if the Unicode escape sequence `\\u000A`, for example, occurs within a single-line comment, it is interpreted as a line terminator (Unicode code point U+000A is LINE FEED) and therefore the next code point is not part of the comment. Similarly, if the Unicode escape sequence `\\u000A` occurs within a string literal in a Java program, it is likewise interpreted as a line terminator, which is not allowed within a string literal—one must write `\\n` instead of `\\u000A` to cause a LINE FEED to be part of the String value of a string literal. In an ECMAScript program, a Unicode escape sequence occurring within a comment is never interpreted and therefore cannot contribute to termination of the comment. Similarly, a Unicode escape sequence occurring within a string literal in an ECMAScript program always contributes to the literal and is never interpreted as a line terminator or as a code point that might terminate the string literal.</p>
</emu-note>

<emu-clause id="sec-utf16encodecodepoint" type="abstract operation" oldids="sec-utf16encoding,sec-codepointtoutf16codeunits">
Expand Down Expand Up @@ -44936,85 +44936,61 @@ <h1>
<th>
Code Point
</th>
<th>
Unicode Character Name
</th>
<th>
Escape Sequence
</th>
</tr>
<tr>
<td>
U+0008
</td>
<td>
BACKSPACE
U+0008 (BACKSPACE)
</td>
<td>
`\\b`
</td>
</tr>
<tr>
<td>
U+0009
</td>
<td>
CHARACTER TABULATION
U+0009 (CHARACTER TABULATION)
</td>
<td>
`\\t`
</td>
</tr>
<tr>
<td>
U+000A
</td>
<td>
LINE FEED (LF)
U+000A (LINE FEED)
</td>
<td>
`\\n`
</td>
</tr>
<tr>
<td>
U+000C
</td>
<td>
FORM FEED (FF)
U+000C (FORM FEED)
</td>
<td>
`\\f`
</td>
</tr>
<tr>
<td>
U+000D
</td>
<td>
CARRIAGE RETURN (CR)
U+000D (CARRIAGE RETURN)
</td>
<td>
`\\r`
</td>
</tr>
<tr>
<td>
U+0022
</td>
<td>
QUOTATION MARK
U+0022 (QUOTATION MARK)
</td>
<td>
`\\"`
</td>
</tr>
<tr>
<td>
U+005C
</td>
<td>
REVERSE SOLIDUS
U+005C (REVERSE SOLIDUS)
</td>
<td>
`\\\\`
Expand Down

0 comments on commit 89a747a

Please sign in to comment.