Skip to content

Commit

Permalink
Editorial: Split the "TV and TRV" clause into 2 clauses (#2375)
Browse files Browse the repository at this point in the history
... one for TV and one for TRV.

(This duplicates 4 cases, but they're very simple.)
  • Loading branch information
jmdyck authored and ljharb committed Jul 28, 2021
1 parent e7610a8 commit 39a1ed5
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -16976,21 +16976,21 @@ <h2>Syntax</h2>
<p>|TemplateSubstitutionTail| is used by the |InputElementTemplateTail| alternative lexical goal.</p>
</emu-note>

<emu-clause id="sec-static-semantics-tv-and-trv">
<h1>Static Semantics: TV and TRV</h1>
<p>A template literal component is interpreted by TV and TRV as a value of the String type. TV is used to construct the indexed components of a template object (colloquially, the template values), and TRV is used to construct their raw counterparts (colloquially, the template raw values). In TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence. TRV is similar to TV with the difference being that in TRV, escape sequences are interpreted as they appear in the literal.</p>
<emu-clause id="sec-static-semantics-tv" type="sdo" aoid="TV" oldids="sec-static-semantics-tv-and-trv">
<h1>Static Semantics: TV</h1>
<p>A template literal component is interpreted by TV as a value of the String type. TV is used to construct the indexed components of a template object (colloquially, the template values). In TV, escape sequences are replaced by the UTF-16 code unit(s) of the Unicode code point represented by the escape sequence.</p>
<ul>
<li>
The TV and TRV of <emu-grammar>NoSubstitutionTemplate :: ``` ```</emu-grammar> is the empty String.
The TV of <emu-grammar>NoSubstitutionTemplate :: ``` ```</emu-grammar> is the empty String.
</li>
<li>
The TV and TRV of <emu-grammar>TemplateHead :: ``` `${`</emu-grammar> is the empty String.
The TV of <emu-grammar>TemplateHead :: ``` `${`</emu-grammar> is the empty String.
</li>
<li>
The TV and TRV of <emu-grammar>TemplateMiddle :: `}` `${`</emu-grammar> is the empty String.
The TV of <emu-grammar>TemplateMiddle :: `}` `${`</emu-grammar> is the empty String.
</li>
<li>
The TV and TRV of <emu-grammar>TemplateTail :: `}` ```</emu-grammar> is the empty String.
The TV of <emu-grammar>TemplateTail :: `}` ```</emu-grammar> is the empty String.
</li>
<li>
The TV of <emu-grammar>TemplateCharacters :: TemplateCharacter TemplateCharacters</emu-grammar> is *undefined* if either the TV of |TemplateCharacter| is *undefined* or the TV of |TemplateCharacters| is *undefined*. Otherwise, it is the string-concatenation of the TV of |TemplateCharacter| and the TV of |TemplateCharacters|.
Expand All @@ -17013,6 +17013,25 @@ <h1>Static Semantics: TV and TRV</h1>
<li>
The TV of <emu-grammar>LineContinuation :: `\` LineTerminatorSequence</emu-grammar> is the empty String.
</li>
</ul>
</emu-clause>

<emu-clause id="sec-static-semantics-trv" type="sdo" aoid="TRV">
<h1>Static Semantics: TRV</h1>
<p>A template literal component is interpreted by TRV as a value of the String type. TRV is used to construct the raw components of a template object (colloquially, the template raw values). TRV is similar to TV with the difference being that in TRV, escape sequences are interpreted as they appear in the literal.</p>
<ul>
<li>
The TRV of <emu-grammar>NoSubstitutionTemplate :: ``` ```</emu-grammar> is the empty String.
</li>
<li>
The TRV of <emu-grammar>TemplateHead :: ``` `${`</emu-grammar> is the empty String.
</li>
<li>
The TRV of <emu-grammar>TemplateMiddle :: `}` `${`</emu-grammar> is the empty String.
</li>
<li>
The TRV of <emu-grammar>TemplateTail :: `}` ```</emu-grammar> is the empty String.
</li>
<li>
The TRV of <emu-grammar>TemplateCharacters :: TemplateCharacter TemplateCharacters</emu-grammar> is the string-concatenation of the TRV of |TemplateCharacter| and the TRV of |TemplateCharacters|.
</li>
Expand Down

0 comments on commit 39a1ed5

Please sign in to comment.