Skip to content

Commit 25b81c1

Browse files
zherczegdbatyai
authored andcommitted
Implement statement parsing in the scanner. (#3137)
To implement let/const, the code affected by for statements needs to be identified, and this patch implements the basic infrastructure for that. The short term benefit is that scanner info blocks are not generated for do-while blocks. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
1 parent a7c6546 commit 25b81c1

File tree

2 files changed

+442
-252
lines changed

2 files changed

+442
-252
lines changed

jerry-core/parser/js/js-parser-statm.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,7 @@ parser_parse_do_while_statement_end (parser_context_t *context_p) /**< context *
697697

698698
parser_set_continues_to_current_position (context_p, loop.branch_list_p);
699699

700-
/* FIXME: These statements should not have scanner info. */
701-
if (context_p->next_scanner_info_p->type == SCANNER_TYPE_WHILE)
702-
{
703-
scanner_release_next (context_p, sizeof (scanner_location_info_t));
704-
}
700+
JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p);
705701

706702
parser_parse_enclosed_expr (context_p);
707703

0 commit comments

Comments
 (0)