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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7588,7 +7588,7 @@ <h1>FunctionDeclarationInstantiation ( _func_, _argumentsList_ )</h1>
1. Let _parameterBindings_ be a new List of _parameterNames_ with `"arguments"` appended.
1. Else,
1. Let _parameterBindings_ be _parameterNames_.
1. Let _iteratorRecord_ be CreateListIterator(_argumentsList_).
1. Let _iteratorRecord_ be CreateListIteratorRecord(_argumentsList_).
1. If _hasDuplicates_ is *true*, then
1. Perform ? IteratorBindingInitialization for _formals_ with _iteratorRecord_ and *undefined* as arguments.
1. Else,
Expand Down Expand Up @@ -19413,7 +19413,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1. Set _received_ to GeneratorYield(_innerResult_).
1. Else,
1. NOTE: If _iterator_ does not have a `throw` method, this throw is going to terminate the `yield*` loop. But first we need to give _iterator_ a chance to clean up.
1. Perform ? IteratorClose(_iteratorResult_, Completion{[[Type]]: ~normal~, [[Value]]: ~empty~, [[Target]]: ~empty~}).
1. Perform ? IteratorClose(_iteratorRecord_, Completion{[[Type]]: ~normal~, [[Value]]: ~empty~, [[Target]]: ~empty~}).
1. NOTE: The next step throws a *TypeError* to indicate that there was a `yield*` protocol violation: _iterator_ does not have a `throw` method.
1. Throw a *TypeError* exception.
1. Else,
Expand Down Expand Up @@ -29246,9 +29246,13 @@ <h1>Static Semantics: CapturingGroupNumber</h1>
<h1>Static Semantics: IsCharacterClass</h1>
<emu-grammar>
ClassAtom :: `-`

ClassAtomNoDash :: SourceCharacter but not one of `\` or `]` or `-`

ClassEscape :: `b`

ClassEscape :: `-`

ClassEscape :: CharacterEscape
</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -29414,7 +29418,7 @@ <h1>Static Semantics: CharacterValue</h1>
</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.

</emu-alg>
<emu-grammar>RegExpUnicodeEscapeSequence :: `u` LeadSurrogate `\u` TrailSurrogate</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -29445,7 +29449,9 @@ <h1>Static Semantics: CharacterValue</h1>
</emu-alg>
<emu-grammar>
LeadSurrogate :: Hex4Digits

TrailSurrogate :: Hex4Digits

NonSurrogate :: Hex4Digits
</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -30216,11 +30222,7 @@ <h1>CharacterEscape</h1>
<emu-clause id="sec-decimalescape">
<h1>DecimalEscape</h1>
<p>The |DecimalEscape| productions evaluate as follows:</p>
<emu-grammar>
DecimalEscape ::
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).

<emu-alg>
1. Return the CapturingGroupNumber of this |DecimalEscape|.
</emu-alg>
Expand Down Expand Up @@ -30388,7 +30390,9 @@ <h1>ClassEscape</h1>
<p>The |ClassEscape| productions evaluate as follows:</p>
<emu-grammar>
ClassEscape :: `b`

ClassEscape :: `-`

ClassEscape :: CharacterEscape
</emu-grammar>
<emu-alg>
Expand Down Expand Up @@ -39145,13 +39149,13 @@ <h1>Static Semantics: Early Errors</h1>
<emu-grammar>NonemptyClassRanges :: ClassAtom `-` ClassAtom ClassRanges</emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of the first |ClassAtom| is *true* or IsCharacterClass of the second |ClassAtom| is *true* <ins>and this production has a [U] parameter</ins>.
It is a Syntax Error if IsCharacterClass of the first |ClassAtom| is *true* or IsCharacterClass of the second |ClassAtom| is *true* <ins>and this production has a <sub>[U]</sub> parameter</ins>.
</li>
</ul>
<emu-grammar>NonemptyClassRangesNoDash :: ClassAtomNoDash `-` ClassAtom ClassRanges</emu-grammar>
<ul>
<li>
It is a Syntax Error if IsCharacterClass of |ClassAtomNoDash| is *true* or IsCharacterClass of |ClassAtom| is *true* <ins>and this production has a [U] parameter</ins>.
It is a Syntax Error if IsCharacterClass of |ClassAtomNoDash| is *true* or IsCharacterClass of |ClassAtom| is *true* <ins>and this production has a <sub>[U]</sub> parameter</ins>.
</li>
</ul>
</emu-annex>
Expand Down Expand Up @@ -39185,7 +39189,7 @@ <h1>Static Semantics: CharacterValue</h1>
<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! :-)

</emu-alg>
</emu-annex>

Expand Down