Fix usage of array_list in parse_switch_statement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -2448,7 +2448,7 @@ parse_switch_statement (void)
|
|||||||
next_token_must_be (TOK_COLON);
|
next_token_must_be (TOK_COLON);
|
||||||
dump_case_clause_check_for_rewrite (switch_expr, case_expr);
|
dump_case_clause_check_for_rewrite (switch_expr, case_expr);
|
||||||
skip_newlines ();
|
skip_newlines ();
|
||||||
array_list_append (body_locs, (void*) &tok.loc);
|
body_locs = array_list_append (body_locs, (void*) &tok.loc);
|
||||||
skip_case_clause_body ();
|
skip_case_clause_body ();
|
||||||
}
|
}
|
||||||
else if (is_keyword (KW_DEFAULT))
|
else if (is_keyword (KW_DEFAULT))
|
||||||
@@ -2461,7 +2461,7 @@ parse_switch_statement (void)
|
|||||||
token_after_newlines_must_be (TOK_COLON);
|
token_after_newlines_must_be (TOK_COLON);
|
||||||
skip_newlines ();
|
skip_newlines ();
|
||||||
default_body_index = array_list_len (body_locs);
|
default_body_index = array_list_len (body_locs);
|
||||||
array_list_append (body_locs, (void*) &tok.loc);
|
body_locs = array_list_append (body_locs, (void*) &tok.loc);
|
||||||
skip_case_clause_body ();
|
skip_case_clause_body ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user