Skip to content

Make rule name available inside action blocks #540

@frostburn

Description

@frostburn

It would be nice if Rule.name and maybe even Rule.displayName were available inside action blocks.

Use case:

FooLiteral
  = "foo" {
    return {
       type: ruleName, // type: "FooLiteral"
       location: location(),
    };
  }

Here ruleName is a block scope constant, but it could also be a callable i.e. ruleName() if that's easier to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions