Add literal registration in parse_member_expression (TOK_KEYWORD case).

Related issue: #116

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-06-19 22:16:21 +03:00
parent 89a7449913
commit a536073da4
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -773,7 +773,7 @@ parse_member_expression (operand *this_arg, operand *prop_gl)
else if (token_is (TOK_KEYWORD))
{
const char *s = lexer_keyword_to_string ((keyword) token_data ());
literal_t lit = lit_find_literal_by_charset ((const ecma_char_t *) s, (ecma_length_t) strlen (s));
literal_t lit = lit_find_or_create_literal_from_charset ((const ecma_char_t *) s, (ecma_length_t) strlen (s));
if (lit == NULL)
{
EMIT_ERROR ("Expected identifier");