Add support of ReferenceError early error to parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
committed by
Evgeny Gavrin
parent
06d0c1806d
commit
44b7b95781
@@ -1334,14 +1334,16 @@ jerry_parse (const jerry_api_char_t* source_p, /**< script source */
|
||||
parser_set_show_opcodes (is_show_opcodes);
|
||||
|
||||
const opcode_t *opcodes_p;
|
||||
bool is_syntax_correct;
|
||||
jsp_status_t parse_status;
|
||||
|
||||
is_syntax_correct = parser_parse_script (source_p,
|
||||
source_size,
|
||||
&opcodes_p);
|
||||
parse_status = parser_parse_script (source_p,
|
||||
source_size,
|
||||
&opcodes_p);
|
||||
|
||||
if (!is_syntax_correct)
|
||||
if (parse_status != JSP_STATUS_OK)
|
||||
{
|
||||
JERRY_ASSERT (parse_status == JSP_STATUS_SYNTAX_ERROR || parse_status == JSP_STATUS_REFERENCE_ERROR);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user