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:
Szilard Ledan 2015-07-15 10:25:55 +02:00 committed by Evgeny Gavrin
parent 4fdb5249b9
commit d2457b1fc6
2 changed files with 11 additions and 0 deletions

View File

@ -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";

View File

@ -107,3 +107,13 @@ catch (e)
{
assert (e instanceof SyntaxError);
}
try
{
eval ("v_0 = {a: Math, /[]/};");
assert (false);
}
catch(e)
{
assert (e instanceof SyntaxError);
}