Add missing RegExp case in the token_type_to_string
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Evgeny Gavrin
parent
4fdb5249b9
commit
d2457b1fc6
@@ -1690,6 +1690,7 @@ lexer_token_type_to_string (token_type tt)
|
|||||||
case TOK_KEYWORD: return "Keyword";
|
case TOK_KEYWORD: return "Keyword";
|
||||||
case TOK_SMALL_INT: /* FALLTHRU */
|
case TOK_SMALL_INT: /* FALLTHRU */
|
||||||
case TOK_NUMBER: return "Number";
|
case TOK_NUMBER: return "Number";
|
||||||
|
case TOK_REGEXP: return "RegExp";
|
||||||
|
|
||||||
case TOK_NULL: return "null";
|
case TOK_NULL: return "null";
|
||||||
case TOK_BOOL: return "bool";
|
case TOK_BOOL: return "bool";
|
||||||
|
|||||||
@@ -107,3 +107,13 @@ catch (e)
|
|||||||
{
|
{
|
||||||
assert (e instanceof SyntaxError);
|
assert (e instanceof SyntaxError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
eval ("v_0 = {a: Math, /[]/};");
|
||||||
|
assert (false);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
assert (e instanceof SyntaxError);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user