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 zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg 2019-09-20 12:15:16 +02:00 committed by Dániel Bátyai
parent a7c654617d
commit 25b81c106c
2 changed files with 444 additions and 254 deletions

View File

@ -697,11 +697,7 @@ parser_parse_do_while_statement_end (parser_context_t *context_p) /**< context *
parser_set_continues_to_current_position (context_p, loop.branch_list_p);
/* FIXME: These statements should not have scanner info. */
if (context_p->next_scanner_info_p->type == SCANNER_TYPE_WHILE)
{
scanner_release_next (context_p, sizeof (scanner_location_info_t));
}
JERRY_ASSERT (context_p->next_scanner_info_p->source_p != context_p->source_p);
parser_parse_enclosed_expr (context_p);

File diff suppressed because it is too large Load Diff