Temporary workaround (until parser is refactored) for fixing evaluation of simple 'identifier'-like expressions.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan 2015-07-13 21:22:16 +03:00 committed by Evgeny Gavrin
parent 5e329c815c
commit 6fe78cc994
2 changed files with 5 additions and 2 deletions

View File

@ -1756,6 +1756,8 @@ parse_expression (bool in_allowed, /**< flag indicating if 'in' is allowed insid
skip_newlines ();
if (token_is (TOK_COMMA))
{
dump_assignment_of_lhs_if_literal (expr);
skip_newlines ();
expr = parse_assignment_expression (in_allowed);
}
@ -2828,7 +2830,8 @@ parse_statement (jsp_label_t *outermost_stmt_label_p) /**< outermost (first) lab
{
lexer_save_token (tok);
tok = temp;
parse_expression (true, JSP_EVAL_RET_STORE_DUMP);
operand expr = parse_expression (true, JSP_EVAL_RET_STORE_DUMP);
dump_assignment_of_lhs_if_literal (expr);
skip_newlines ();
if (!token_is (TOK_SEMICOLON))
{

View File

@ -41,7 +41,7 @@ const char *test_source = (
" return this.external ('1', true); "
"} "
"function call_throw_test() { "
" bool catched = false "
" var catched = false "
" try { "
" this.throw_test(); "
" } catch (e) { "