tc39 / proposal-extractors

Extractors for ECMAScript
http://tc39.es/proposal-extractors/
MIT License
200 stars 3 forks source link

Allow `this` to be part of the qualified name. #3

Closed Andarist closed 5 months ago

Andarist commented 1 year ago

If I read things correctly - this is not allowed because QualifiedName only allows Identifiers and those don't allow reserved words: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#prod-Identifier

It would be cool if this.X could be used as an extractor object. A wrapper object/class might accept another that is responsible for maintaining a state that otherwise is opaque to the wrapper itself and it would be very nice if the extraction concerns could be delegated to that inner object.

rbuckton commented 5 months ago

This will be addressed by #12.

Jack-Works commented 5 months ago

do I need to make any changes to the pattern-matching site?

rbuckton commented 5 months ago

No, I believe the definitions I'm using in the current spec text are essentially the same as the ones used in pattern matching.