tc39 / proposal-json-parse-with-source

Proposal for extending JSON.parse to expose input source text.
https://tc39.github.io/proposal-json-parse-with-source
MIT License
213 stars 9 forks source link

Editorial: Rename ArrayElementList to clarify its purpose #31

Closed gibson042 closed 2 years ago

gibson042 commented 2 years ago

Responding to https://github.com/tc39/proposal-json-parse-with-source/issues/29#issuecomment-1162465280

ArrayElementList is a bit broken in general too. If elisions are present, the length of the list generated by ArrayElementList is not necessarily equal to the array's length because a single Elision can contain multiple commas but ArrayElementList treats it as a single element. However, the JSON syntax doesn't allow elisions, so it happens to work on JSON arrays.