Description:
Right now, getting information like the method name, parameters, statements, or modifier from a FASTTypescriptMethod_definition means searching through the children array and picking out the right element by its class.
Proposal:
We could add direct accessors for the following children:
identifier (the TypescriptProperty_identifier, for the method name)
statements (the TypescriptStatement_block, for the method body)
parameters (the method’s TypescriptProperty_identifier parameters)
modifier (the TypescriptAccessibility_modifier)
Example:
Current way to get the method name:
(method children detect: [:c | c className = 'TypescriptProperty_identifier']) sourceCode.
With the proposed change:
method identifier sourceCode.