repl: fix generator function preprocessing · nodejs/node@eba4f9a · GitHub
Skip to content

Commit eba4f9a

Browse files
not-an-aardvarkMylesBorins
authored andcommitted
repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable declarations before being evaluated. However, the preprocessing logic did not account for the star in a generator function declaration, which caused the preprocessor to output invalid syntax in some circumstances. PR-URL: #9852 Fixes: #9850 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 99ef3c0 commit eba4f9a

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

lib/repl.js

Lines changed: 4 additions & 2 deletions

test/parallel/test-repl.js

Lines changed: 13 additions & 0 deletions

0 commit comments

Comments
 (0)