-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
This isn't a bug, its a formatting question/request. (cc @ljharb)
I am currently reading https://tc39.es/ecma262/#sec-parsemodule and the last instruction here returns a complex object with a number of fields. It looks like this in the text:
12. Return Source Text Module Record { [[Realm]]: realm, [[Environment]]: undefined, [[Namespace]]:
undefined, [[Status]]: unlinked, [[EvaluationError]]: undefined, [[HostDefined]]: hostDefined,
[[ECMAScriptCode]]: body, [[Context]]: empty, [[ImportMeta]]: empty, [[RequestedModules]]:
requestedModules, [[ImportEntries]]: importEntries, [[LocalExportEntries]]: localExportEntries,
[[IndirectExportEntries]]: indirectExportEntries, [[StarExportEntries]]: starExportEntries, [[DFSIndex]]:
undefined, [[DFSAncestorIndex]]: undefined }.
I imagin this has been discussed in the past. Are there ideas of how to make this easier to read? For example:
12. Return Source Text Module Record {
[[Realm]]: realm,
[[Environment]]: undefined,
[[Namespace]]: undefined,
[[Status]]: unlinked,
[[EvaluationError]]: undefined,
[[HostDefined]]: hostDefined,
[[ECMAScriptCode]]: body,
[[Context]]: empty,
[[ImportMeta]]: empty,
[[RequestedModules]]: requestedModules,
[[ImportEntries]]: importEntries,
[[LocalExportEntries]]: localExportEntries,
[[IndirectExportEntries]]: indirectExportEntries,
[[StarExportEntries]]: starExportEntries,
[[DFSIndex]]: undefined,
[[DFSAncestorIndex]]: undefined
}.
It takes up a lot more space, but it is also much easier to see what is going on.
Reactions are currently unavailable