repl: refine handling of illegal tokens#7104
Conversation
|
Before: After: |
|
But this still works, as expected: Before: After: (No change between the two.) |
|
LGTM although checking for ILLEGAL could break when we upgrade V8. |
|
@bnoordhuis Seems fine, the test will catch it. |
lib/repl.js
Outdated
|
Is it possible to generate EDIT: Yes, it is very very possible. |
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: nodejs#3611
|
Nits addressed, re-running CI: https://ci.nodejs.org/job/node-test-pull-request/2919/ |
|
Only CI failure was a single build failure on a Raspberry Pi. Trying again because YOU CAN'T BE TOO CAREFUL!!!11!!! or something like that. |
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. PR-URL: nodejs#7104 Fixes: nodejs#3611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
Landed in de0aa23 |
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. PR-URL: #7104 Fixes: #3611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
@Trott lts? |
|
@thealphanerd If it lands cleanly, yes. |
|
this one does not land cleanly |
Checklist
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: #3611