-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normative: Suppress source text for JSON parse data modified before access #41
Conversation
646d90f
to
7fc28f7
Compare
7fc28f7
to
cc64b74
Compare
@waldemarhorwat @michaelficarra @syg I welcome your reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArrayLiteralContentNodes
returns lists which may contain Elision
nodes. These are in turn passed to CreateJSONParseRecord
, followed by ShallowestContainedJSONValue
. So by my reading, the assertion that is step 2 of CreateJSONParseRecord
will fail.
1. Let _entryParseRecord_ be CreateJSONParseRecord(_propertyValueNode_, _P_, ! Get(_val_, _P_)). | ||
1. Append _entryParseRecord_ to _entries_. | ||
1. Else, | ||
1. Assert: _typedValNode_ is not an |ArrayLiteral| Parse Node and not an |ObjectLiteral| Parse Node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this assertion here? The invariant holds only for this step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To assert agreement between parseNode and val: the latter is an object if and only if the former is an |ArrayLiteral| or |ObjectLiteral|.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 this assertion is helpful.
Please don't introduce an SDO with the same name as a nonterminal in the grammar ( |
Elisions are not valid in JSON text. |
…rated in source order
@michaelficarra Do you have an alternative name suggestion? |
1. Let _entryParseRecord_ be CreateJSONParseRecord(_propertyValueNode_, _P_, ! Get(_val_, _P_)). | ||
1. Append _entryParseRecord_ to _entries_. | ||
1. Else, | ||
1. Assert: _typedValNode_ is not an |ArrayLiteral| Parse Node and not an |ObjectLiteral| Parse Node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 this assertion is helpful.
Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes #35
Fixes #39