mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Introduce jsp_label_remove_all_labels interface that removes all jump labels registered at the moment of call for usage upon raise of SyntaxError during parse.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
parent
bd9d1d4afd
commit
9b0f5d439d
@ -47,6 +47,18 @@ jsp_label_finalize (void)
|
||||
JERRY_ASSERT (label_set_p == NULL);
|
||||
} /* jsp_label_finalize */
|
||||
|
||||
/**
|
||||
* Remove all labels
|
||||
*
|
||||
* Note:
|
||||
* should be used only upon a SyntaxError is raised
|
||||
*/
|
||||
void
|
||||
jsp_label_remove_all_labels (void)
|
||||
{
|
||||
label_set_p = NULL;
|
||||
} /* jsp_label_remove_all_labels */
|
||||
|
||||
/**
|
||||
* Add label to the current label set
|
||||
*/
|
||||
|
||||
@ -67,6 +67,8 @@ typedef struct jsp_label_t
|
||||
extern void jsp_label_init (void);
|
||||
extern void jsp_label_finalize (void);
|
||||
|
||||
extern void jsp_label_remove_all_labels (void);
|
||||
|
||||
extern void jsp_label_push (jsp_label_t *out_label_p, jsp_label_type_flag_t type_mask, token id);
|
||||
extern void jsp_label_rewrite_jumps_and_pop (jsp_label_t *label_p, opcode_counter_t break_tgt_oc);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user