Add global status flags for the parser. (#3572)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-02-24 11:22:20 +01:00
committed by GitHub
parent cdbabc8c30
commit bd2696f7c7
10 changed files with 42 additions and 60 deletions
+2 -1
View File
@@ -555,7 +555,8 @@ parser_module_check_request_place (parser_context_t *context_p) /**< parser cont
{
if (context_p->last_context_p != NULL
|| context_p->stack_top_uint8 != 0
|| (context_p->status_flags & (PARSER_IS_EVAL | PARSER_IS_FUNCTION)) != 0)
|| (context_p->status_flags & PARSER_IS_FUNCTION)
|| (context_p->global_status_flags & ECMA_PARSE_EVAL))
{
parser_raise_error (context_p, PARSER_ERR_MODULE_UNEXPECTED);
}