Closed szuend closed 4 weeks ago
Hey all, I incorporated the feedback form yesterday's meeting. Thanks a ton for the fruitful discussion! In particular:
For functions/methods/generators emit the named mapping on the binding identifier by default (or opening parenthesis if no identifier is present).
Special case single argument arrow functions that have neither a binding identifier or an opening parenthesis.
Introduce a definition for "named mapping". I.e. a decoded mapping entry where the name field is not null.
Call out that generators may emit additional "named mappings" as they require. Either to support existing tools or to fit their requirements.
English is not my native language and writing spec text is not my strong suite, so I'd welcome some word smithing/rephrasing to clear up the meaning. I also spelled out some more things that require review. Thanks!
This is a first draft that clarifies on which JS tokens we expect mappings with a
name
.I tried to stick to the ECMA-262 AST on a level where it makes sense, but let me know what you think. I also used lang
A nice tie-in with the "Scopes" proposal is, that the
(
token that shows up in the definition is also what we'll probably recommend as the "generated range" start, so that would fit rather well together.Thinks that still need clarification:
name
. Since we don't know the source language we need to keep it generic but we should make it clear that it should also make sense semantically.name
?obj.x
intof
.