Skip to content

Commit 2de49cd

Browse files
Fix of 'case' / 'default' statements skip during parse of SwitchStatement.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
1 parent 0b1b102 commit 2de49cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jerry-core/parser/js/parser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,13 +2038,15 @@ parse_with_statement (void)
20382038
static void
20392039
skip_case_clause_body (void)
20402040
{
2041-
while (!is_keyword (KW_CASE) && !is_keyword (KW_DEFAULT) && !token_is (TOK_CLOSE_BRACE))
2041+
while (!is_keyword (KW_CASE)
2042+
&& !is_keyword (KW_DEFAULT)
2043+
&& !token_is (TOK_CLOSE_BRACE))
20422044
{
2043-
skip_newlines ();
20442045
if (token_is (TOK_OPEN_BRACE))
20452046
{
20462047
skip_braces ();
20472048
}
2049+
skip_newlines ();
20482050
}
20492051
}
20502052

0 commit comments

Comments
 (0)