-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc Editorial re recent commits #1023
Conversation
... for consistency with similar wording elsewhere.
(only one occurrence) Commit bfecd4f eliminated the phrase "code unit value" in algorithms.
…ce|" ... to "the numeric value of the code unit that is the SV of |HexEscapeSequence|". The SV of |HexEscapeSequence| is a single code unit, and it doesn't make much sense to ask for the code point value of a code unit.
NonZeroDigit | ||
NonZeroDigit DecimalDigits | ||
</emu-grammar> | ||
<emu-grammar>DecimalEscape :: NonZeroDigit DecimalDigits?</emu-grammar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -39189,7 +39189,7 @@ | |||
<emu-grammar>CharacterEscape :: LegacyOctalEscapeSequence</emu-grammar> | |||
<emu-alg> | |||
1. Evaluate the SV of the |LegacyOctalEscapeSequence| (see <emu-xref href="#sec-additional-syntax-string-literals"></emu-xref>) to obtain a code unit _cu_. | |||
1. Return the code unit value of _cu_. | |||
1. Return the numeric value of _cu_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for correcting this! :-)
@@ -29418,7 +29418,7 @@ | |||
</emu-note> | |||
<emu-grammar>CharacterEscape :: HexEscapeSequence</emu-grammar> | |||
<emu-alg> | |||
1. Return the code point value of the SV of |HexEscapeSequence|. | |||
1. Return the numeric value of the code unit that is the SV of |HexEscapeSequence|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I picked code point value
, so I could use the same phrase within the complete section (21.2.1.4 Static Semantics: CharacterValue). Only changing it to numeric value of the code unit
for CharacterEscape :: HexEscapeSequence
looks a bit odd, because also other productions in 21.2.1.4 evaluate to a single code unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other productions in 21.2.1.4 evaluate to a single code unit.
No, CharacterValue returns an integer in the Unicode codespace, which is too big for a single (16-bit) code unit.
Elsewhere in 21.2.1.4, in occurrences of "the code point value of X" (or "X's code point value"), X either literally denotes a code point (e.g. "U+002D (HYPHEN-MINUS)") or is a metavariable whose value is a code point. But the SV of |HexEscapeSequence|
is not a code point, so I think it would be misleading to use the same formulation.
Please check that I made the correct fix in the first commit.