@@ -67,20 +67,18 @@ div.rules {
67
67
68
68
<h1>Specification</h1>
69
69
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>
84
82
85
83
<h2>Abstract Syntax</h2>
86
84
@@ -220,6 +218,7 @@ and + have their usual meaning, i.e. repetition without commas. </p>
220
218
<table>
221
219
<tr><td><i>field</i></td><td>::=</td><td>
222
220
<i>fieldname</i>
221
+ [ '<code>+</code>' ]
223
222
'<code>:</code>'
224
223
[ '<code>:</code>' ]
225
224
<i>e</i>
@@ -229,6 +228,7 @@ and + have their usual meaning, i.e. repetition without commas. </p>
229
228
'<code>(</code>'
230
229
<i>id</i>★
231
230
'<code>)</code>'
231
+ [ '<code>+</code>' ]
232
232
'<code>:</code>'
233
233
[ '<code>:</code>' ]
234
234
<i>e</i>
@@ -569,6 +569,17 @@ Other cases invoke structural recursion.
569
569
<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>)
570
570
571
571
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
+
572
583
</td></tr><tr><td>
573
584
<i>desugarfield</i>(<i>fname</i> <code>(</code> <i>params</i> <code>)</code>:: <i>expr</i>, <i>b</i>)
574
585
</td><td> = </td><td>
0 commit comments