In JavaScript #
is an illegal token, not a comment (try inputting this in a browser JavaScript console). This generates a syntax error when evaluated, however the node REPL is trying to be helpful by buffering the command and prompting you for more input (...
) in an attempt to recover from the error.
This would be the same behaviour here (as documented in the REPL source):
> { // syntax error!
... x : 1 // syntax error!
... } // recovered ...
{ x: 1 }
However, in your case I don't believe you can ever recover from the bad syntax.