repl: support standalone blocks
Enable support for standalone block statements. ```js node🙈 ₹ git:(upstream⚡ bare-block) ./node > { var x = 3; console.log(x); } 3 undefined > {} {} > { x:1, y:"why not", z: function() {} } { x: 1, y: 'why not', z: [Function] } > ``` For the ambiguous inputs like `{ x }`, the existing REPL behaviour (ES6 literal shorthand) is preserved (prefers expression over statement). Fixes: https://github.com/nodejs/node/issues/5576 PR-URL: https://github.com/nodejs/node/pull/5581 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com>
parent
0d0c57ff
Please register or sign in to comment