Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
squash: nits
  • Loading branch information
Trott committed Jun 4, 2016
commit 75e4759d2617a59cecc2896e7c79aa807b69d68d
12 changes: 6 additions & 6 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,10 @@ REPLServer.prototype.convertToContext = function(cmd) {
return cmd;
};

function bailOnIllegalToken(lp) {
return lp._literal === null && !lp.blockComment && !lp.regExpLiteral;
function bailOnIllegalToken(parser) {
return parser._literal === null &&
!parser.blockComment &&
!parser.regExpLiteral;
}

// If the error is that we've unexpectedly ended the input,
Expand All @@ -1169,7 +1171,8 @@ function isRecoverableError(e, self) {
return true;
}

if (message.startsWith('Unexpected end of input'))
if (message.startsWith('Unexpected end of input') ||
message.startsWith('missing ) after argument list'))
return true;

if (message.startsWith('Unexpected token')) {
Expand All @@ -1178,9 +1181,6 @@ function isRecoverableError(e, self) {
else
return true;
}

if (message.startsWith('missing ) after argument list'))
return true;
}
return false;
}
Expand Down