Skip to content

Commit 15ce2e0

Browse files
authored
Editorial: Rename _value_ alias for clarity (#32)
1 parent da75096 commit 15ce2e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ <h1><span class="secnum">1.2.1</span> InternalizeJSONProperty ( <var>holder</var
25792579
<emu-nt><a href="https://tc39.es/ecma262/#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>
25802580
</emu-rhs>
25812581
</emu-production>
2582-
</emu-grammar>.</ins></li><li><ins>Let <var>value</var> be the <emu-nt><a href="https://tc39.es/ecma262/#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> of <var>propertyDefinition</var>.</ins></li><li>Let <var>newElement</var> be ?&nbsp;<emu-xref aoid="InternalizeJSONProperty" id="_ref_8"><a href="#sec-internalizejsonproperty">InternalizeJSONProperty</a></emu-xref>(<var>val</var>, <var>P</var>, <var>reviver</var><ins>, <var>value</var></ins>).</li><li>If <var>newElement</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform ?&nbsp;<var>val</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Else,<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataProperty"><a href="https://tc39.es/ecma262/#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>val</var>, <var>P</var>, <var>newElement</var>).</li></ol></li></ol></li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>reviver</var>, <var>holder</var>, « <var>name</var>, <var>val</var><ins>, <var>context</var></ins> »).</li></ol></emu-alg>
2582+
</emu-grammar>.</ins></li><li><ins>Let <var>propertyValueNode</var> be the <emu-nt><a href="https://tc39.es/ecma262/#prod-AssignmentExpression">AssignmentExpression</a></emu-nt> of <var>propertyDefinition</var>.</ins></li><li>Let <var>newElement</var> be ?&nbsp;<emu-xref aoid="InternalizeJSONProperty" id="_ref_8"><a href="#sec-internalizejsonproperty">InternalizeJSONProperty</a></emu-xref>(<var>val</var>, <var>P</var>, <var>reviver</var><ins>, <var>propertyValueNode</var></ins>).</li><li>If <var>newElement</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform ?&nbsp;<var>val</var>.[[Delete]](<var>P</var>).</li></ol></li><li>Else,<ol><li>Perform ?&nbsp;<emu-xref aoid="CreateDataProperty"><a href="https://tc39.es/ecma262/#sec-createdataproperty">CreateDataProperty</a></emu-xref>(<var>val</var>, <var>P</var>, <var>newElement</var>).</li></ol></li></ol></li></ol></li></ol></li><li>Return ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>reviver</var>, <var>holder</var>, « <var>name</var>, <var>val</var><ins>, <var>context</var></ins> »).</li></ol></emu-alg>
25832583
<p>It is not permitted for a conforming implementation of <code>JSON.parse</code> to extend the JSON grammars. If an implementation wishes to support a modified or extended JSON interchange format it must do so by defining a different parse function.</p>
25842584
<emu-note><span class="note">Note 2</span><div class="note-contents">
25852585
<p>In the case where there are duplicate name Strings within an object, lexically preceding values for the same key shall be overwritten.</p>

spec.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ <h1>
123123
1. <ins>Assert: _propertyDefinition_ is not ~empty~.</ins>
124124
1. <ins>NOTE: In the case of JSON text specifying multiple name/value pairs with the same name for a single object (such as <code>{"a":"lost","a":"kept"}</code>), the value for the corresponding property of the resulting ECMAScript object is specified by the last pair with that name.</ins>
125125
1. <ins>Assert: _propertyDefinition_ is <emu-grammar>PropertyDefinition : PropertyName `:` AssignmentExpression</emu-grammar>.</ins>
126-
1. <ins>Let _value_ be the |AssignmentExpression| of _propertyDefinition_.</ins>
127-
1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _P_, _reviver_<ins>, _value_</ins>).
126+
1. <ins>Let _propertyValueNode_ be the |AssignmentExpression| of _propertyDefinition_.</ins>
127+
1. Let _newElement_ be ? InternalizeJSONProperty(_val_, _P_, _reviver_<ins>, _propertyValueNode_</ins>).
128128
1. If _newElement_ is *undefined*, then
129129
1. Perform ? <emu-meta effects="user-code">_val_.[[Delete]]</emu-meta>(_P_).
130130
1. Else,

0 commit comments

Comments
 (0)