How is this parsed by the Javascript lexer? (Closures-pattern without parens)
<p>I've noticed this pattern of wrapping closures in parens <code>()</code></p>

<pre><code>(function () {
  var foo = 1;
  return function () {return foo}
}())
</code></pre>

<p>It raises the question, how is this supposed to be parsed:</p>

<pre><code>function () {
  var foo = 1;
  return function () {return foo}
}()
</code></pre>
