Skip to content
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

Merged
merged 6 commits into from
Oct 25, 2017
Merged

Misc Editorial re recent commits #1023

merged 6 commits into from
Oct 25, 2017

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Oct 17, 2017

Please check that I made the correct fix in the first commit.

... 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.
@jmdyck jmdyck changed the title Editorial: fix 2 typos from recent commit Misc Editorial re recent commits Oct 22, 2017
@bterlson bterlson merged commit 08b4a3f into tc39:master Oct 25, 2017
NonZeroDigit
NonZeroDigit DecimalDigits
</emu-grammar>
<emu-grammar>DecimalEscape :: NonZeroDigit DecimalDigits?</emu-grammar>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The ? optional qualifier won't be displayed in the output document (this is a known issue, cf. #536 and #908).

@@ -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_.
Copy link
Contributor

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|.
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants