repl: handle comments properly · nodejs/node@8a2c4ae · GitHub
Skip to content

Commit 8a2c4ae

Browse files
thefourtheyejasnell
authored andcommitted
repl: handle comments properly
As it is, the comments are not handled properly in REPL. So, if the comments have `'` or `"`, then they are treated as incomplete string literals and the error is thrown in REPL. This patch refactors the existing logic and groups everything in a class. Fixes: #3421 PR-URL: #3515 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 8d78d68 commit 8a2c4ae

2 files changed

Lines changed: 122 additions & 78 deletions

File tree

lib/repl.js

Lines changed: 94 additions & 78 deletions

test/parallel/test-repl.js

Lines changed: 28 additions & 0 deletions

0 commit comments

Comments
 (0)