Skip to content

repl: refine handling of illegal tokens

Rodrigo Muino Tomonari requested to merge github/fork/Trott/narwhal into master
Checklist
  • a test and/or benchmark is included
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Illegal tokens are only recoverable in string literals, RegExp literals, and block comments. If not in one of these constructs, immediately return an error rather than giving the user false hope by giving them a chance to try to recover.

Fixes: https://github.com/nodejs/node/issues/3611

Merge request reports

Loading