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:
committed by
Evgeny Gavrin
parent
5e329c815c
commit
6fe78cc994
@@ -1756,6 +1756,8 @@ parse_expression (bool in_allowed, /**< flag indicating if 'in' is allowed insid
|
|||||||
skip_newlines ();
|
skip_newlines ();
|
||||||
if (token_is (TOK_COMMA))
|
if (token_is (TOK_COMMA))
|
||||||
{
|
{
|
||||||
|
dump_assignment_of_lhs_if_literal (expr);
|
||||||
|
|
||||||
skip_newlines ();
|
skip_newlines ();
|
||||||
expr = parse_assignment_expression (in_allowed);
|
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);
|
lexer_save_token (tok);
|
||||||
tok = temp;
|
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 ();
|
skip_newlines ();
|
||||||
if (!token_is (TOK_SEMICOLON))
|
if (!token_is (TOK_SEMICOLON))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const char *test_source = (
|
|||||||
" return this.external ('1', true); "
|
" return this.external ('1', true); "
|
||||||
"} "
|
"} "
|
||||||
"function call_throw_test() { "
|
"function call_throw_test() { "
|
||||||
" bool catched = false "
|
" var catched = false "
|
||||||
" try { "
|
" try { "
|
||||||
" this.throw_test(); "
|
" this.throw_test(); "
|
||||||
" } catch (e) { "
|
" } catch (e) { "
|
||||||
|
|||||||
Reference in New Issue
Block a user