Open
Description
It seems unnecessary to me that Function.prototype.toString()
returns a useless placeholder token (like it does with native functions). For native functions it is fair enough, and the ECMAScript standard reflects this; but the code in this case is JavaScript, even if it's in AST form, so it seems like it would be better to more closely follow the behaviour of real JavaScript. Furthermore, there is at least some code which relies on Function.prototype.toString()
, whether you feel that's a prudent idea or not.
How much trouble would it be to have Function.prototype.toString()
lazily emit a valid (or standard) JavaScript source representation of the binary AST instead?
Metadata
Assignees
Labels
No labels
Activity