Shell: Don't be confused by SyntaxErrors thrown by command execution. #8446
Apply the check for a SyntaxError indicating an incomplete command only to the ECMAScript translation and parsing of a command and not to the execution, following the example of Node's defaultEval function. Fixes #8290.
Just a note to revisit this/clean-up in Node 6 as the `Recoverable` is now exported from Node 6's `eval` and this is no longer necessary. * https://github.com/nodejs/node/blob/v6.x/lib/repl.js#L1398 * https://nodejs.org/api/repl.html#repl_custom_evaluation_functions
This is awesome! Thanks for looking into this, @mattmccutchen!
Just to provide insight to anyone peering in: Some of this
Re: Tests. I think all regressions are unintentional and I'd like to get tests for this eventually, but seeing at there is not currently a harness in place for the shell (an interactive test is necessary, perhaps) and this is actually an improvement to an existing deficiency, we might be willing to forgo a test for this. That being said, I'll leave this for more "LGTM"s as a precaution.