Fix of 'case' / 'default' statements skip during parse of SwitchStatement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -2038,13 +2038,15 @@ parse_with_statement (void)
|
|||||||
static void
|
static void
|
||||||
skip_case_clause_body (void)
|
skip_case_clause_body (void)
|
||||||
{
|
{
|
||||||
while (!is_keyword (KW_CASE) && !is_keyword (KW_DEFAULT) && !token_is (TOK_CLOSE_BRACE))
|
while (!is_keyword (KW_CASE)
|
||||||
|
&& !is_keyword (KW_DEFAULT)
|
||||||
|
&& !token_is (TOK_CLOSE_BRACE))
|
||||||
{
|
{
|
||||||
skip_newlines ();
|
|
||||||
if (token_is (TOK_OPEN_BRACE))
|
if (token_is (TOK_OPEN_BRACE))
|
||||||
{
|
{
|
||||||
skip_braces ();
|
skip_braces ();
|
||||||
}
|
}
|
||||||
|
skip_newlines ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user