Skip to content

Add direct accessors for children in FASTTypescriptMethod_definition #1

@knowbased

Description

@knowbased

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions