Add custom configuration to jerry_parse and its variants (#4620)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-03-10 09:56:48 +01:00
committed by GitHub
parent 7a2665621b
commit 546422161e
45 changed files with 658 additions and 596 deletions
+5 -4
View File
@@ -183,12 +183,13 @@ main (void)
{
jerry_init (JERRY_INIT_EMPTY);
jerry_parse_options_t parse_options;
parse_options.options = JERRY_PARSE_STRICT_MODE;
/* Render strict-equal as a function. */
jerry_value_t parse_result = jerry_parse (NULL,
0,
strict_equal_source,
jerry_value_t parse_result = jerry_parse (strict_equal_source,
sizeof (strict_equal_source) - 1,
JERRY_PARSE_STRICT_MODE);
&parse_options);
TEST_ASSERT (!jerry_value_is_error (parse_result));
jerry_value_t strict_equal = jerry_run (parse_result);
TEST_ASSERT (!jerry_value_is_error (strict_equal));