Add SingleMethodDefinition top rule #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bug/1402163_MethodDeclaration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
FEATURE: The grammar now supports
top: "SingleMethodDefinition"to parse a method definition according to the ECMAScript specification1 rather than a script or a single expression.Bug: crbug/1402163
https://tc39.es/ecma262/#prod-MethodDefinition ↩︎
Why aren't
static/abstractpart of this? And wouldn't it be useful in more situations if we include any class item in the exported rule?The use case is to parse what falls out of
Function.prototype.toString()for the purpose of extracting the arguments list in DevTools. For that we need exactly MethodDefinition per spec (although it wouldn't hurt to allow for more).You can checkout my devtools-frontend CL to see how I'm using this.
Does patch
bf8d1f7look like it would cover your need?That works, thanks!
Pull request closed