Skip to content

for-of using declaration can collide with for-lhs-of #107

Description

@JLHwung

According to the current spec

for (using of of [foo]);

can be either 1) a for-lhs-of statement where using is an LHS and of [foo] is an assignment expression
or 2) a for-of using statement where the first of is the using binding and [foo] is an assignment expression.

Because the first interpretation is already valid ECMAScript, we can consider disallow of after using in for-of statement:

for ( using [no LineTerminator here][lookahead ≠ of] ForBinding[?Yield, ?Await, +Using] of AssignmentExpression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions