Fix bytecode emitting for invalid regexp literals (#4422)

This patch fixes #4408.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-07 17:19:52 +01:00
committed by GitHub
parent 7972386412
commit 979a0c7826
3 changed files with 30 additions and 4 deletions
+2 -1
View File
@@ -2919,7 +2919,8 @@ lexer_construct_function_object (parser_context_t *context_p, /**< context */
* Construct a regular expression object.
*
* Note: In ESNEXT the constructed literal's type can be LEXER_STRING_LITERAL which represents
* invalid pattern. The string literal contains the thrown error message.
* invalid pattern. In this case the lit_object's index contains the thrown error message literal.
* Otherwise a new literal is appended to the end of the literal pool.
*/
void
lexer_construct_regexp_object (parser_context_t *context_p, /**< context */