Closed jogibear9988 closed 1 year ago
A slightly delayed response... I guess there's none yet but probably will be a nice addition.
work started here: https://github.com/sebastienros/esprima-dotnet/pull/353
is the correct way to create a new node type? or should we add a property "IsAccessor" ? I think estree spec says it's a new node type: https://github.com/estree/estree/blob/master/stage3/decorators.md
Parsing is not so simple, cause I need 2 lookforwards in static part e.g.
static accessor = 3;
so here accessor is not the keyword, it's a static property name... I'm looking whats the best way to do this. Mainly I think the complete "ParseClassElement" should be refactored to smaller functions, it's a bit of a mess
is the correct way to create a new node type? or should we add a property "IsAccessor" ? I think estree spec says it's a new node type: estree/estree@master/stage3/decorators.md
Maybe we should start with new type that inherits from ClassProperty
like current MethodDefinition
and PropertyDefinition
. It seems that you've gone this route already and we can always change if needed.
I believe this is done!
It's part of the decorators proposal see: https://github.com/estree/estree/blob/master/stage3/decorators.md#accessorproperty