> Le 22 févr. 2016 à 17:47, Bradley Meck <[email protected]> a écrit :
> 
> Does that mean the following would parse as a do expression?
> 
> ```javascript
> function foo () {
>   return
>   do {
>     1;
>   }
>   while (true);
> }
> ```

No, because `return` cannot be followed be a LineTerminator, so that ASI will 
introduce a semicolon after it.

This is the same issue as:

```js
function foo() {
    return   // an implied semicolon is inserted here
    { bar: 1 }; // interpreted as a block, not as an object literal
}
```

—Claude
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to