Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Editorial: Correct and make readable for-in/of/await-of static semantics #1284
Currently, VarScopedDeclarations is defined for
in two different places with conflicting definitions. Remove the incorrect definition.
Coalesce children of
jmdyck left a comment
Not "several", but one RHS (
The first commit eliminates the first of the conflicting definitions, which looks like the correct fix to me. However, the commit somewhat obscures that fix by also moving a different RHS from one group to another. It would be clearer to accomplish that move in the second commit. Also, the commit message should maybe be more specific about what it's fixing.
The second commit merges groups that have the same algorithm, which is purely editorial, and should indeed improve readability. However, in a multi-RHS production, I think we normally put the RHSs in the same order as they appear in the defining production.
No, I don't think any RHSs are missing. ( If you're thinking of the
Indeed. Commit message fixed.
I'll let the editors decide on this, but my belief is that it is editorial.
Commit message has been changed.
Coalesce children of `for`-`in`, `for`-`of`, and `for`-`await`-`of` statements with identical definitions for VarDeclaredNames and VarScopedDeclarations for better readability: instead of having six different algorithm blocks for each of VarDeclaredNames and VarScopedDeclarations now there are only two.