-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #5576 PR-URL: #5581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
- Loading branch information
1 parent
0d0c57f
commit 4271732
Showing
2 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters