-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b5794dd
Editorial: fix 2 typos from recent commit
jmdyck 296f6e0
Editorial: Add blank lines in multi-prodn <emu-grammar>s
jmdyck 8de9d52
Editorial: Un-expand a needlessly expanded prodn
jmdyck 0933cf9
Editorial: Change [U] to <sub>[U]</sub>
jmdyck 30a37ea
Editorial: "code unit value" -> "numeric value"
jmdyck 81c4c42
Editorial: Change "the code point value of the SV of |HexEscapeSequen…
jmdyck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
|
@@ -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, | ||
|
@@ -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> | ||
|
@@ -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|. | ||
</emu-alg> | ||
<emu-grammar>RegExpUnicodeEscapeSequence :: `u` LeadSurrogate `\u` TrailSurrogate</emu-grammar> | ||
<emu-alg> | ||
|
@@ -29445,7 +29449,9 @@ <h1>Static Semantics: CharacterValue</h1> | |
</emu-alg> | ||
<emu-grammar> | ||
LeadSurrogate :: Hex4Digits | ||
|
||
TrailSurrogate :: Hex4Digits | ||
|
||
NonSurrogate :: Hex4Digits | ||
</emu-grammar> | ||
<emu-alg> | ||
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<emu-alg> | ||
1. Return the CapturingGroupNumber of this |DecimalEscape|. | ||
</emu-alg> | ||
|
@@ -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> | ||
|
@@ -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> | ||
|
@@ -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_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for correcting this! :-) |
||
</emu-alg> | ||
</emu-annex> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 tonumeric value of the code unit
forCharacterEscape :: 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.
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.