Skip to content

Commit 0d2243a

Browse files
committed
Fix #23
1 parent 3354fbf commit 0d2243a

File tree

2 files changed

+50
-28
lines changed

2 files changed

+50
-28
lines changed

doc/spec.html

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,18 @@
256256

257257
<h1>Specification</h1>
258258

259-
<p>
260-
This page is the authority on what Jsonnet programs should do. It defines what
261-
input is / is not a syntactically valid Jsonnet program, and precisely how they are parsed. It
262-
describes which programs should be rejected statically (i.e. before execution). Finally, it
263-
specifies the manner in which the program is executed, i.e. the JSON that is output, or the dynamic
264-
error if there is one.</p>
265-
266-
<p>The specification is intended be terse but precise. The intention is to illuminate various
267-
subtleties and edge cases in order to allow fully-compatible reimplementations of the language,
268-
refactoring tools, etc. The specification employs some standard theoretical computer science
269-
techniques, namely <a href="http://en.wikipedia.org/wiki/Type_systems">type systems</a> and <a
270-
href="http://en.wikipedia.org/wiki/Operational_semantics">big step operational semantics</a>. If
271-
that's not your cup of tea, then see the more discussive description of Jsonnet behavior in <a
272-
href="tutorial.html">tutorial</a>.</p>
259+
<p> This page is the authority on what Jsonnet programs should do. It defines Jsonnet syntax and
260+
parsing. It describes which programs should be rejected statically (i.e. before execution).
261+
Finally, it specifies the manner in which the program is executed, i.e. the JSON that is output, or
262+
the dynamic error if there is one.</p>
263+
264+
<p>The specification is intended to be terse but precise. The intention is to illuminate various
265+
subtleties and edge cases in order to allow fully-compatible reimplementations of the language, as
266+
well as analysis tools, refactoring tools, etc. The specification employs some standard theoretical
267+
computer science techniques, namely <a href="http://en.wikipedia.org/wiki/Type_systems">type
268+
systems</a> and <a href="http://en.wikipedia.org/wiki/Operational_semantics">big step operational
269+
semantics</a>. If that's not your cup of tea, then see the more discussive description of Jsonnet
270+
behavior in <a href="tutorial.html">tutorial</a>.</p>
273271

274272
<h2>Abstract Syntax</h2>
275273

@@ -409,6 +407,7 @@ <h2>Abstract Syntax</h2>
409407
<table>
410408
<tr><td><i>field</i></td><td>::=</td><td>
411409
<i>fieldname</i>
410+
[ '<code>+</code>' ]
412411
'<code>:</code>'
413412
[ '<code>:</code>' ]
414413
<i>e</i>
@@ -418,6 +417,7 @@ <h2>Abstract Syntax</h2>
418417
'<code>(</code>'
419418
<i>id</i>
420419
'<code>)</code>'
420+
[ '<code>+</code>' ]
421421
'<code>:</code>'
422422
[ '<code>:</code>' ]
423423
<i>e</i>
@@ -758,6 +758,17 @@ <h3>Desugaring</h3>
758758
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) : <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
759759

760760

761+
</td></tr><tr><td>
762+
<i>desugarfield</i>(<i>fname</i> +:: <i>expr</i>, <i>binds</i>, <i>b</i>)
763+
</td><td> = </td><td>
764+
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) :: <code>super</code>.<i>fname</i> <code>+</code> <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
765+
766+
</td></tr><tr><td>
767+
<i>desugarfield</i>(<i>fname</i> +: <i>expr</i>, <i>binds</i>, <i>b</i>)
768+
</td><td> = </td><td>
769+
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) : <code>super</code>.<i>fname</i> <code>+</code> <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
770+
771+
761772
</td></tr><tr><td>
762773
<i>desugarfield</i>(<i>fname</i> <code>(</code> <i>params</i> <code>)</code>:: <i>expr</i>, <i>b</i>)
763774
</td><td> = </td><td>

doc/spec.html.jinja

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,18 @@ div.rules {
6767
6868
<h1>Specification</h1>
6969
70-
<p>
71-
This page is the authority on what Jsonnet programs should do. It defines what
72-
input is / is not a syntactically valid Jsonnet program, and precisely how they are parsed. It
73-
describes which programs should be rejected statically (i.e. before execution). Finally, it
74-
specifies the manner in which the program is executed, i.e. the JSON that is output, or the dynamic
75-
error if there is one.</p>
76-
77-
<p>The specification is intended be terse but precise. The intention is to illuminate various
78-
subtleties and edge cases in order to allow fully-compatible reimplementations of the language,
79-
refactoring tools, etc. The specification employs some standard theoretical computer science
80-
techniques, namely <a href="http://en.wikipedia.org/wiki/Type_systems">type systems</a> and <a
81-
href="http://en.wikipedia.org/wiki/Operational_semantics">big step operational semantics</a>. If
82-
that's not your cup of tea, then see the more discussive description of Jsonnet behavior in <a
83-
href="tutorial.html">tutorial</a>.</p>
70+
<p> This page is the authority on what Jsonnet programs should do. It defines Jsonnet syntax and
71+
parsing. It describes which programs should be rejected statically (i.e. before execution).
72+
Finally, it specifies the manner in which the program is executed, i.e. the JSON that is output, or
73+
the dynamic error if there is one.</p>
74+
75+
<p>The specification is intended to be terse but precise. The intention is to illuminate various
76+
subtleties and edge cases in order to allow fully-compatible reimplementations of the language, as
77+
well as analysis tools, refactoring tools, etc. The specification employs some standard theoretical
78+
computer science techniques, namely <a href="http://en.wikipedia.org/wiki/Type_systems">type
79+
systems</a> and <a href="http://en.wikipedia.org/wiki/Operational_semantics">big step operational
80+
semantics</a>. If that's not your cup of tea, then see the more discussive description of Jsonnet
81+
behavior in <a href="tutorial.html">tutorial</a>.</p>
8482
8583
<h2>Abstract Syntax</h2>
8684
@@ -220,6 +218,7 @@ and + have their usual meaning, i.e. repetition without commas. </p>
220218
<table>
221219
<tr><td><i>field</i></td><td>::=</td><td>
222220
<i>fieldname</i>
221+
[ '<code>+</code>' ]
223222
'<code>:</code>'
224223
[ '<code>:</code>' ]
225224
<i>e</i>
@@ -229,6 +228,7 @@ and + have their usual meaning, i.e. repetition without commas. </p>
229228
'<code>(</code>'
230229
<i>id</i>★
231230
'<code>)</code>'
231+
[ '<code>+</code>' ]
232232
'<code>:</code>'
233233
[ '<code>:</code>' ]
234234
<i>e</i>
@@ -569,6 +569,17 @@ Other cases invoke structural recursion.
569569
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) : <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
570570
571571
572+
</td></tr><tr><td>
573+
<i>desugarfield</i>(<i>fname</i> +:: <i>expr</i>, <i>binds</i>, <i>b</i>)
574+
</td><td> = </td><td>
575+
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) :: <code>super</code>.<i>fname</i> <code>+</code> <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
576+
577+
</td></tr><tr><td>
578+
<i>desugarfield</i>(<i>fname</i> +: <i>expr</i>, <i>binds</i>, <i>b</i>)
579+
</td><td> = </td><td>
580+
<i>desugarfname</i>(<i>fname</i>, <i>b</i>) : <code>super</code>.<i>fname</i> <code>+</code> <code>local</code> <i>binds</i> <code>;</code> <i>desugar</i>(<i>expr</i>, <code>true</code>)
581+
582+
572583
</td></tr><tr><td>
573584
<i>desugarfield</i>(<i>fname</i> <code>(</code> <i>params</i> <code>)</code>:: <i>expr</i>, <i>b</i>)
574585
</td><td> = </td><td>

0 commit comments

Comments
 (0)