diff --git a/jerry-core/parser/js/lexer.cpp b/jerry-core/parser/js/lexer.cpp index 748acad0f..74a5a5192 100644 --- a/jerry-core/parser/js/lexer.cpp +++ b/jerry-core/parser/js/lexer.cpp @@ -1690,6 +1690,7 @@ lexer_token_type_to_string (token_type tt) case TOK_KEYWORD: return "Keyword"; case TOK_SMALL_INT: /* FALLTHRU */ case TOK_NUMBER: return "Number"; + case TOK_REGEXP: return "RegExp"; case TOK_NULL: return "null"; case TOK_BOOL: return "bool"; diff --git a/tests/jerry/eval.js b/tests/jerry/eval.js index 84b5557a8..8f1fe11e6 100644 --- a/tests/jerry/eval.js +++ b/tests/jerry/eval.js @@ -107,3 +107,13 @@ catch (e) { assert (e instanceof SyntaxError); } + +try +{ + eval ("v_0 = {a: Math, /[]/};"); + assert (false); +} +catch(e) +{ + assert (e instanceof SyntaxError); +}