// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
path: language/module-code/top-level-await/syntax/while-
name: Valid syntax for top level await in an while expression position.
esid: prod-AwaitExpression
info: |
  ModuleItem:
    StatementListItem[~Yield, +Await, ~Return]

  ...

  IterationStatement[Yield, Await, Return]:
    while ( Expression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return]

  ...

  UnaryExpression[Yield, Await]
    [+Await]AwaitExpression[?Yield]

  AwaitExpression[Yield]:
    await UnaryExpression[?Yield, +Await]

  ...
flags: [module]
features: [top-level-await]
---*/

while (/*{ expr }*/) { break; }
