Skip to content

Commit ea0255a

Browse files
sbarzowskisparkprime
authored andcommitted
Fix swapped indexes in spec (object-inherit) (#367)
* Fix swapped indexes and apostrophes in spec (object-inherit)
1 parent 9aa90e2 commit ea0255a

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc/language/spec.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
font-family: Arial, sans-serif;
99
font-weight: medium;
1010
font-style: italic;
11-
color: #008
11+
color: #008
1212
}
1313

1414
/* Value sets */
1515
em {
1616
font-family: Arial, sans-serif;
17-
font-weight: medium;
17+
font-weight: medium;
1818
font-style: italic;
1919
color: #800
2020
}
@@ -158,12 +158,12 @@ <h2 id="lexing">Lexing</h2>
158158

159159
</li>
160160

161-
<li><i>symbol</i>:
161+
<li><i>symbol</i>:
162162
The following single-character symbols:
163163
<p><code>{}[],.();</code></p>
164164
</li>
165165

166-
<li><i>operator</i>:
166+
<li><i>operator</i>:
167167
A sequence of at least one of the following single-character symbols:
168168
<code>!$:~+-&amp;|^=&lt;&gt;*/%</code>
169169
<p>Subject to the following rules, which will cause the lexing to terminate with a shorter
@@ -233,15 +233,15 @@ <h2 id="abstract_syntax">Abstract Syntax</h2>
233233
<i>expr</i>
234234
<code>[</code>
235235
<i>expr</i>
236-
[ <code>:</code> [ <i>expr</i>
236+
[ <code>:</code> [ <i>expr</i>
237237
[ <code>:</code> [ <i>expr</i> ] ] ] ]
238238
<code>]</code>
239239

240240
<!-- object index (general2) -->
241241
</td></tr> <tr><td></td><td> | </td><td>
242242
<i>expr</i>
243243
<code>[</code>
244-
<code>:</code> [ <i>expr</i>
244+
<code>:</code> [ <i>expr</i>
245245
[ <code>:</code> [ <i>expr</i> ] ] ] ]
246246
<code>]</code>
247247

@@ -512,15 +512,15 @@ <h2 id="abstract_syntax">Abstract Syntax</h2>
512512
<code>^</code> |
513513
<code>|</code> |
514514
<code>&amp;&amp;</code> |
515-
<code>||</code>
515+
<code>||</code>
516516
</td></tr>
517517

518518
<!-- unaryop -->
519519
<tr><td><i>unaryop</i></td><td>::=</td><td>
520520
<code>-</code> |
521521
<code>+</code> |
522522
<code>!</code> |
523-
<code>~</code>
523+
<code>~</code>
524524
</td></tr>
525525
</table>
526526

@@ -573,7 +573,7 @@ <h3 id="core_syntax">Core Syntax</h3>
573573

574574
<ul>
575575
<li>The set of identifiers now includes <code>$</code>, which is no-longer a special keyword.</li>
576-
<li>The following binary operators are removed: <code>!=</code> <code>==</code>
576+
<li>The following binary operators are removed: <code>!=</code> <code>==</code>
577577
<code>%</code> <code>in</code></li>
578578
<li>Array slices <code>[::]</code> are removed.</li>
579579
<li>Array and object comprehensions are replaced with a simple object comprehension construct.</li>
@@ -928,7 +928,7 @@ <h3 id="desugaring">Desugaring</h3>
928928

929929
<div class="desugar-rule"> \[
930930
desugar_{field}(string \mathrel{h} e), binds, b) =
931-
desugar_{field}([string] \mathrel{h} e), binds, b)
931+
desugar_{field}([string] \mathrel{h} e), binds, b)
932932
\] </div>
933933

934934
<div class="desugar-rule"> \[
@@ -1015,7 +1015,7 @@ <h3 id="desugaring">Desugaring</h3>
10151015
\hspace{10mm}desugar_{expr}(
10161016
\local{arr = e'}{
10171017
\texttt{std.join}(\\\hspace{20mm}[], \texttt{std.makeArray}(
1018-
\texttt{std.length}(arr),
1018+
\texttt{std.length}(arr),
10191019
\function{i}{\local{x = arr[i]}{[base]}}
10201020
))
10211021
},
@@ -1178,7 +1178,7 @@ <h4 id="jsonnet_values">Jsonnet Values</h4>
11781178

11791179
<p> When executed, Jsonnet expressions yield Jsonnet values. These need to be manifested, an
11801180
additional step, to get JSON values. The differences between Jsonnet values and JSON values are:
1181-
1) Jsonnet values contain functions (which are not representable in JSON). 2)
1181+
1) Jsonnet values contain functions (which are not representable in JSON). 2)
11821182
Due to the lazy semantics, both object fields and array elements have yet to be executed to yield
11831183
values. 3) Object assertions still need to be checked.</p>
11841184

@@ -1257,7 +1257,7 @@ <h4 id="substitution">Capture-Avoiding Substitution</h4>
12571257
...
12581258
<code>[</code><i>e''</i><code>]</code> <i>h</i> <i>e'''</i>
12591259
...
1260-
<code>}</code>[<i>e</i>/<i>x</i>] =
1260+
<code>}</code>[<i>e</i>/<i>x</i>] =
12611261
<code>{</code>
12621262
...
12631263
<code>assert</code> <i>e'</i>[<i>e</i>/<i>x</i>]
@@ -1484,14 +1484,14 @@ <h4 id="execution">Execution</h4>
14841484

14851485
<div class="sequent-rule"> \[\rule{object-inherit} {
14861486
e^L ↓ \object{
1487-
\assert e''^L_1 \ldots \assert e''^L_n,\
1488-
f_1 h^L_1 e^L_1 \ldots f_m h^L_m e^L_m,\
1487+
\assert e''^L_1 \ldots \assert e''^L_n,\
1488+
f_1 h^L_1 e^L_1 \ldots f_m h^L_m e^L_m,\
14891489
f'^L_1 h'^L_1 e'^L_1 \ldots f'^L_p h'^L_p e'^L_p
14901490
}
14911491
\\
14921492
e^R ↓ \object{
1493-
\assert e''^R_1 \ldots \assert e''^R_q,\
1494-
f_1 h^R_1 e^R_1 \ldots f_m h^R_m e^R_m,\
1493+
\assert e''^R_1 \ldots \assert e''^R_q,\
1494+
f_1 h^R_1 e^R_1 \ldots f_m h^R_m e^R_m,\
14951495
f'^R_1 h'^R_1 e'^R_1 \ldots f'^R_r h'^R_r e'^R_r
14961496
}
14971497
\\
@@ -1502,18 +1502,18 @@ <h4 id="execution">Execution</h4>
15021502
e_s = \super + \object{
15031503
\assert S(e''^L_1) \ldots \assert S(e''^L_n),\\
15041504
\hspace{20mm}
1505-
f_1 h^L_1 S(e^L_1) \ldots f_m h^L_m S(e^L_m),\
1505+
f_1 h^L_1 S(e^L_1) \ldots f_m h^L_m S(e^L_m),\
15061506
f'^L_1 h'^L_1 S(e'^L_1) \ldots f'^L_p h'^L_p S(e'^L_p)
15071507
}
15081508
\\
15091509
∀i∈\{1 \ldots m\}: h'''_i = h^L_i + h^R_i ∧
15101510
e'''_i = (\local{x = \self, y = \super}{e^R_i ⟦e_s / \super⟧})
15111511
\\
15121512
o = \{ \\
1513-
\hspace{5mm} \assert e''^L_1 \ldots \assert e''^L_n, \
1514-
\assert e''^R_1 \ldots \assert e''^R_p, \\
1515-
\hspace{5mm} f^L_1 h^L_1 e^L_1 \ldots f^L_p h^L_p e^L_p, \
1516-
f^R_1 h^R_1 e^R_1 \ldots f^R_q h^R_q e^R_q, \
1513+
\hspace{5mm} \assert e''^L_1 \ldots \assert e''^L_n, \
1514+
\assert e''^R_1 \ldots \assert e''^R_q, \\
1515+
\hspace{5mm} f'^L_1 h'^L_1 e'^L_1 \ldots f'^L_p h'^L_p e'^L_p, \
1516+
f'^R_1 h'^R_1 e'^R_1 \ldots f'^R_r h'^R_r e'^R_r, \
15171517
f_1 h'''_1 e'''_m \ldots f_m h'''_m e'''_m \\
15181518
\}
15191519
} {
@@ -1805,9 +1805,9 @@ <h4 id="manifestation">Manifestation</h4>
18051805

18061806
<div class="sequent-rule"> \[\rule{manifest-object} {
18071807
o = \object{
1808-
\assert e''_1 \ldots \assert e''_m,\
1809-
f_1 h_1 e_1 \ldots f_n h_n e_n,\
1810-
f'_1 :: e'_1 \ldots f'_p :: e'_p,\
1808+
\assert e''_1 \ldots \assert e''_m,\
1809+
f_1 h_1 e_1 \ldots f_n h_n e_n,\
1810+
f'_1 :: e'_1 \ldots f'_p :: e'_p,\
18111811
}
18121812
\\
18131813
∀i∈\{1\ldots m\}: e''_i⟦o/\self,\{\}/\super⟧↓\_

0 commit comments

Comments
 (0)