Skip to content
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
54 changes: 30 additions & 24 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -54163,7 +54163,7 @@ <h1>Static Semantics: CountLeftCapturingParensWithin and CountLeftCapturingParen

<emu-annex id="sec-patterns-static-semantics-is-character-class-annexb">
<h1>Static Semantics: IsCharacterClass</h1>
<p>The semantics of <emu-xref href="#sec-patterns-static-semantics-is-character-class"></emu-xref> is extended as follows:</p>
<p>The semantics of IsCharacterClass is extended as follows:</p>
<emu-grammar>
ClassAtomNoDash :: `\` [lookahead == `c`]
</emu-grammar>
Expand All @@ -54174,7 +54174,7 @@ <h1>Static Semantics: IsCharacterClass</h1>

<emu-annex id="sec-patterns-static-semantics-character-value-annexb">
<h1>Static Semantics: CharacterValue</h1>
<p>The semantics of <emu-xref href="#sec-patterns-static-semantics-character-value"></emu-xref> is extended as follows:</p>
<p>The semantics of CharacterValue is extended as follows:</p>
<emu-grammar>
ClassAtomNoDash :: `\` [lookahead == `c`]
</emu-grammar>
Expand All @@ -54195,21 +54195,24 @@ <h1>Static Semantics: CharacterValue</h1>

<emu-annex id="sec-compilesubpattern-annexb" oldids="sec-regular-expression-patterns-semantics">
<h1>Runtime Semantics: CompileSubpattern</h1>
<p>The semantics of CompileSubpattern is extended as follows:</p>

<p>The semantics of CompileSubpattern with arguments _regexpRecord_ and _direction_ is extended as follows:</p>
<p>The rule for <emu-grammar>Term :: QuantifiableAssertion Quantifier</emu-grammar> is the same as for <emu-grammar>Term :: Atom Quantifier</emu-grammar> but with |QuantifiableAssertion| substituted for |Atom|.</p>
<p>The rule for <emu-grammar>Term :: ExtendedAtom Quantifier</emu-grammar> is the same as for <emu-grammar>Term :: Atom Quantifier</emu-grammar> but with |ExtendedAtom| substituted for |Atom|.</p>
<p>The rule for <emu-grammar>Term :: ExtendedAtom</emu-grammar> is the same as for <emu-grammar>Term :: Atom</emu-grammar> but with |ExtendedAtom| substituted for |Atom|.</p>
</emu-annex>

<emu-annex id="sec-compileassertion-annexb">
<h1>Runtime Semantics: CompileAssertion</h1>
<p>CompileAssertion rules for the <emu-grammar>Assertion :: `(?=` Disjunction `)`</emu-grammar> and <emu-grammar>Assertion :: `(?!` Disjunction `)`</emu-grammar> productions are also used for the |QuantifiableAssertion| productions, but with |QuantifiableAssertion| substituted for |Assertion|.</p>
<p>The semantics of CompileAssertion with argument _regexpRecord_ is extended as follows:</p>
<p>The rule for <emu-grammar>QuantifiableAssertion :: `(?=` Disjunction `)`</emu-grammar> is the same as for <emu-grammar>Assertion :: `(?=` Disjunction `)`</emu-grammar> but with |QuantifiableAssertion| substituted for |Atom|.</p>
<p>The rule for <emu-grammar>QuantifiableAssertion :: `(?!` Disjunction `)`</emu-grammar> is the same as for <emu-grammar>Assertion :: `(?!` Disjunction `)`</emu-grammar> but with |QuantifiableAssertion| substituted for |Atom|.</p>
</emu-annex>

<emu-annex id="sec-compileatom-annexb">
<h1>Runtime Semantics: CompileAtom</h1>
<p>CompileAtom rules for the |Atom| productions except for <emu-grammar>Atom :: PatternCharacter</emu-grammar> are also used for the |ExtendedAtom| productions, but with |ExtendedAtom| substituted for |Atom|. The following rules, with parameter _direction_, are also added:</p>
<p>The semantics of CompileAtom with arguments _regexpRecord_ and _direction_ is extended as follows:</p>
<p>Rules for the |Atom| productions except for <emu-grammar>Atom :: PatternCharacter</emu-grammar> are also used for the |ExtendedAtom| productions, but with |ExtendedAtom| substituted for |Atom|.</p>
<p>The following rules are also added:</p>
<emu-grammar>ExtendedAtom :: `\` [lookahead == `c`]</emu-grammar>
<emu-alg>
1. Let _charSet_ be the CharSet containing the single character `\\` U+005C (REVERSE SOLIDUS).
Expand All @@ -54225,9 +54228,8 @@ <h1>Runtime Semantics: CompileAtom</h1>

<emu-annex id="sec-compiletocharset-annexb">
<h1>Runtime Semantics: CompileToCharSet</h1>
<p>The semantics of <emu-xref href="#sec-compiletocharset"></emu-xref> is extended as follows:</p>

<p>The following two rules replace the corresponding rules of CompileToCharSet.</p>
<p>The semantics of CompileToCharSet with argument _regexpRecord_ is extended as follows:</p>
<p>Two rules are replaced:</p>
<emu-grammar>NonemptyClassRanges :: ClassAtom `-` ClassAtom ClassContents</emu-grammar>
<emu-alg>
1. Let _charSet_ be CompileToCharSet of the first |ClassAtom| with argument _regexpRecord_.
Expand All @@ -54244,8 +54246,7 @@ <h1>Runtime Semantics: CompileToCharSet</h1>
1. Let _rangeSet_ be CharacterRangeOrUnion(_regexpRecord_, _charSet_, _otherSet_).
1. Return the union of _rangeSet_ and _remainingSet_.
</emu-alg>

<p>In addition, the following rules are added to CompileToCharSet.</p>
<p>The following rules are also added:</p>
<emu-grammar>ClassEscape :: `c` ClassControlLetter</emu-grammar>
<emu-alg>
1. Let _charValue_ be the CharacterValue of this |ClassEscape|.
Expand Down Expand Up @@ -54281,8 +54282,7 @@ <h1>

<emu-annex id="sec-parsepattern-annexb">
<h1>Static Semantics: ParsePattern ( _patternText_, _u_, _v_ )</h1>
<p>The semantics of <emu-xref href="#sec-parsepattern"></emu-xref> is extended as follows:</p>
<p>The abstract operation ParsePattern takes arguments _patternText_ (a sequence of Unicode code points), _u_ (a Boolean), and _v_ (a Boolean). It performs the following steps when called:</p>
<p>The semantics of ParsePattern with arguments _patternText_, _u_, and _v_ is extended as follows, with modifications <ins>highlighted</ins>:</p>
<emu-alg>
1. If _v_ is *true* and _u_ is *true*, then
1. Let _parseResult_ be a List containing one or more *SyntaxError* objects.
Expand All @@ -54291,8 +54291,8 @@ <h1>Static Semantics: ParsePattern ( _patternText_, _u_, _v_ )</h1>
1. Else if _u_ is *true*, then
1. Let _parseResult_ be ParseText(_patternText_, |Pattern[+UnicodeMode, ~UnicodeSetsMode, +NamedCaptureGroups]|).
1. Else,
1. Let _parseResult_ be ParseText(_patternText_, |Pattern[~UnicodeMode, ~UnicodeSetsMode, ~NamedCaptureGroups]|).
1. If _parseResult_ is a Parse Node and _parseResult_ contains a |GroupName|, then
1. <ins>Let _parseResult_ be ParseText(_patternText_, |Pattern[~UnicodeMode, ~UnicodeSetsMode, ~NamedCaptureGroups]|).</ins>
1. <ins>If _parseResult_ is a Parse Node and _parseResult_ contains a |GroupName|, then</ins>
1. Set _parseResult_ to ParseText(_patternText_, |Pattern[~UnicodeMode, ~UnicodeSetsMode, +NamedCaptureGroups]|).
1. Return _parseResult_.
</emu-alg>
Expand Down Expand Up @@ -54630,9 +54630,8 @@ <h1>Date.prototype.setYear ( _year_ )</h1>
1. Let _dateObj_ be the *this* value.
1. Perform ? RequireInternalSlot(_dateObj_, [[DateValue]]).
1. Let _time_ be _dateObj_.[[DateValue]].
1. Let _year_ be ? ToNumber(_year_).
1. If _time_ is *NaN*, set _time_ to *+0*<sub>𝔽</sub>; else set _time_ to LocalTime(_time_).
1. Let _fullYear_ be MakeFullYear(_year_).
1. Let _fullYear_ be MakeFullYear(? ToNumber(_year_)).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This seems unrelated to the point of the PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's to avoid re-declaring the _year_ variable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, I guess it's for more general linting.

1. Let _day_ be MakeDay(_fullYear_, 𝔽(MonthFromTime(_time_)), 𝔽(DateFromTime(_time_))).
1. Let _date_ be MakeDate(_day_, 𝔽(TimeWithinDay(_time_))).
1. Let _utcTimestamp_ be TimeClip(UTC(_date_)).
Expand Down Expand Up @@ -54784,22 +54783,26 @@ <h1>Initializers in ForIn Statement Heads</h1>
`for` `(` `var` BindingIdentifier[?Yield, ?Await] Initializer[~In, ?Yield, ?Await] `in` Expression[+In, ?Yield, ?Await] `)` Statement[?Yield, ?Await, ?Return]
</emu-grammar>
<p>This production only applies when parsing non-strict code.</p>
<p>The static semantics of ContainsDuplicateLabels in <emu-xref href="#sec-static-semantics-containsduplicatelabels"></emu-xref> are augmented with the following:</p>

<p>The static semantics of ContainsDuplicateLabels with argument _labelSet_ are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return ContainsDuplicateLabels of |Statement| with argument _labelSet_.
</emu-alg>
<p>The static semantics of ContainsUndefinedBreakTarget in <emu-xref href="#sec-static-semantics-containsundefinedbreaktarget"></emu-xref> are augmented with the following:</p>

<p>The static semantics of ContainsUndefinedBreakTarget with argument _labelSet_ are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return ContainsUndefinedBreakTarget of |Statement| with argument _labelSet_.
</emu-alg>
<p>The static semantics of ContainsUndefinedContinueTarget in <emu-xref href="#sec-static-semantics-containsundefinedcontinuetarget"></emu-xref> are augmented with the following:</p>

<p>The static semantics of ContainsUndefinedContinueTarget with arguments _iterationSet_ and _labelSet_ are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Return ContainsUndefinedContinueTarget of |Statement| with arguments _iterationSet_ and « ».
</emu-alg>
<p>The static semantics of IsDestructuring in <emu-xref href="#sec-static-semantics-isdestructuring"></emu-xref> are augmented with the following:</p>

<p>The static semantics of IsDestructuring are augmented with the following:</p>
<emu-grammar>
BindingIdentifier :
Identifier
Expand All @@ -54809,21 +54812,24 @@ <h1>Initializers in ForIn Statement Heads</h1>
<emu-alg>
1. Return *false*.
</emu-alg>
<p>The static semantics of VarDeclaredNames in <emu-xref href="#sec-static-semantics-vardeclarednames"></emu-xref> are augmented with the following:</p>

<p>The static semantics of VarDeclaredNames are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Let _names1_ be the BoundNames of |BindingIdentifier|.
1. Let _names2_ be the VarDeclaredNames of |Statement|.
1. Return the list-concatenation of _names1_ and _names2_.
</emu-alg>
<p>The static semantics of VarScopedDeclarations in <emu-xref href="#sec-static-semantics-varscopeddeclarations"></emu-xref> are augmented with the following:</p>

<p>The static semantics of VarScopedDeclarations are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Let _decls1_ be « |BindingIdentifier| ».
1. Let _decls2_ be the VarScopedDeclarations of |Statement|.
1. Return the list-concatenation of _decls1_ and _decls2_.
</emu-alg>
<p>The runtime semantics of ForInOfLoopEvaluation in <emu-xref href="#sec-runtime-semantics-forinofloopevaluation"></emu-xref> are augmented with the following:</p>

<p>The runtime semantics of ForInOfLoopEvaluation with argument _labelSet_ are augmented with the following:</p>
<emu-grammar>ForInOfStatement : `for` `(` `var` BindingIdentifier Initializer `in` Expression `)` Statement</emu-grammar>
<emu-alg>
1. Let _bindingId_ be the StringValue of |BindingIdentifier|.
Expand Down
Loading