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:
Ruben Ayrapetyan 2015-06-05 18:46:25 +03:00
parent 0b1b102cfa
commit 2de49cdba7

View File

@ -2038,13 +2038,15 @@ parse_with_statement (void)
static 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))
{
skip_braces ();
}
skip_newlines ();
}
}