Fix insert_semicolon

This commit is contained in:
Ilmir Usmanov
2014-10-02 21:35:39 +04:00
parent af00691d1d
commit c4c713535e
4 changed files with 38 additions and 21 deletions
+10 -3
View File
@@ -2764,9 +2764,16 @@ parse_try_statement (void)
static void
insert_semicolon (void)
{
TODO (/*Uncomment when skip_newlines will be fixed. */)
// skip_token ();
// JERRY_ASSERT (token_is (TOK_SEMICOLON) || token_is (TOK_NEWLINE));
// We cannot use TOK (), since we may use lexer_save_token
skip_token ();
if (lexer_prev_token ().type == TOK_NEWLINE)
{
return;
}
if (!token_is (TOK_SEMICOLON))
{
parser_fatal (ERR_PARSER);
}
}
/* statement