Skip to content

single line do-while loop requires ; #49

Open

Description

@plexigras

do …; while … works but do … while … doesn't.

Activity

  1. rattrayalex commented on Mar 26, 2018

    @rattrayalex
    Contributor

    Iirc there was a grammar ambiguity otherwise. I don't recall what it was, might be possible to tell from the tests.

  2. added a commit that references this issue on May 15, 2018
  3. wcjohnson commented on May 15, 2018

    @wcjohnson

    For the record, there is no grammar ambiguity here as of ES2016 (as far as I can tell, anyway) since while is a keyword. I fixed this one by adding while to the canInsertSemicolon whitelist, as I have with other illiberal ASI cases.

    (There may be grammar ambiguities with do expressions enabled.)

  4. added a commit that references this issue on May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions