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.