Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMissing semi-colon in for grammar #924
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pvdz
May 29, 2017
I would like to point out that there's a unique opportunity here to define a "simple" loop where you define the start and finish of a var without, technically, introducing new syntax. for (let i 80; 100) log(i)
pvdz
commented
May 29, 2017
•
|
I would like to point out that there's a unique opportunity here to define a "simple" loop where you define the start and finish of a var without, technically, introducing new syntax. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
littledan
May 29, 2017
Member
@qfox Where do you think the missing semicolon is? LexicalDeclaration's grammar has a semicolon in it.
It's true that this is a possibility for a new language feature, but such a new feature will have to be proposed separately.
|
@qfox Where do you think the missing semicolon is? LexicalDeclaration's grammar has a semicolon in it. It's true that this is a possibility for a new language feature, but such a new feature will have to be proposed separately. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pvdz
May 29, 2017
(That last bit was a joke)
The grammar is
for(LexicalDeclaration Expression; Expression) Statement
I'm pretty sure that should be
for(LexicalDeclaration; Expression; Expression) Statement
pvdz
commented
May 29, 2017
|
(That last bit was a joke) The grammar is
I'm pretty sure that should be
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pvdz
commented
May 29, 2017
|
Oh, I see now. Okay. |
pvdz
closed this
May 29, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
littledan
May 29, 2017
Member
@qfox I'm glad to have you carefully reviewing the ECMAScript spec, even if this ended up being OK already. I hope you keep on the lookout for anything that we could fix or make more clear!
|
@qfox I'm glad to have you carefully reviewing the ECMAScript spec, even if this ended up being OK already. I hope you keep on the lookout for anything that we could fix or make more clear! |
pvdz commentedMay 29, 2017
The
IterationStatement(link) has this rule:While that initially got me excited I've since then recovered and am fairly certain it's just missing the first semi-colon in the grammar.
This bug is present in every appearance of this rule (about 13x, search for
LexicalDeclaration Expression) and was at least present since ES6.Trivial fix.