Skip to content

Commit

Permalink
Editorial: Delete "as modified" wording in Note for JSON.parse.
Browse files Browse the repository at this point in the history
PR tc39#1188 deleted the text
"but using the alternative definition of |DoubleStringCharacter| provided below"
from step 4 of JSON.parse's algorithm.

At that point, the accompanying Note's phrase
"as modified by Step 4 above"
became obsolete.
  • Loading branch information
jmdyck committed Oct 15, 2020
1 parent f2eb022 commit 2c97a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -37645,7 +37645,7 @@ <h1>JSON.parse ( _text_ [ , _reviver_ ] )</h1>
1. Let _jsonString_ be ? ToString(_text_).
1. [id="step-json-parse-validate"] Parse ! StringToCodePoints(_jsonString_) as a JSON text as specified in ECMA-404. Throw a *SyntaxError* exception if it is not a valid JSON text as defined in that specification.
1. Let _scriptString_ be the string-concatenation of *"("*, _jsonString_, and *");"*.
1. [id="step-json-parse-parse"] Let _completion_ be the result of parsing and evaluating ! StringToCodePoints(_scriptString_) as if it was the source text of an ECMAScript |Script|. The extended PropertyDefinitionEvaluation semantics defined in <emu-xref href="#sec-__proto__-property-names-in-object-initializers"></emu-xref> must not be used during the evaluation.
1. Let _completion_ be the result of parsing and evaluating ! StringToCodePoints(_scriptString_) as if it was the source text of an ECMAScript |Script|. The extended PropertyDefinitionEvaluation semantics defined in <emu-xref href="#sec-__proto__-property-names-in-object-initializers"></emu-xref> must not be used during the evaluation.
1. Let _unfiltered_ be _completion_.[[Value]].
1. [id="step-json-parse-assert-type"] Assert: _unfiltered_ is either a String, Number, Boolean, Null, or an Object that is defined by either an |ArrayLiteral| or an |ObjectLiteral|.
1. If IsCallable(_reviver_) is *true*, then
Expand All @@ -37658,7 +37658,7 @@ <h1>JSON.parse ( _text_ [ , _reviver_ ] )</h1>
</emu-alg>
<p>The *"length"* property of the `parse` function is *2*<sub>𝔽</sub>.</p>
<emu-note>
<p>Valid JSON text is a subset of the ECMAScript |PrimaryExpression| syntax as modified by step <emu-xref href="#step-json-parse-parse"></emu-xref> above. Step <emu-xref href="#step-json-parse-validate"></emu-xref> verifies that _jsonString_ conforms to that subset, and step <emu-xref href="#step-json-parse-assert-type"></emu-xref> asserts that that parsing and evaluation returns a value of an appropriate type.</p>
<p>Valid JSON text is a subset of the ECMAScript |PrimaryExpression| syntax. Step <emu-xref href="#step-json-parse-validate"></emu-xref> verifies that _jsonString_ conforms to that subset, and step <emu-xref href="#step-json-parse-assert-type"></emu-xref> asserts that that parsing and evaluation returns a value of an appropriate type.</p>
</emu-note>

<emu-clause id="sec-internalizejsonproperty" aoid="InternalizeJSONProperty">
Expand Down

0 comments on commit 2c97a6a

Please sign in to comment.