Rework jerry_parse function. (#2282)

Remove jerry_parse_named_resource, merge its arguments to jerry_parse
and change is_strict argument to an option list for possible future extensions.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-04-17 09:51:52 +02:00
committed by GitHub
parent 3f3d4a64f1
commit 96b528a486
19 changed files with 146 additions and 146 deletions
+6 -6
View File
@@ -395,7 +395,7 @@ int jerry_main (int argc, char *argv[])
const jerry_char_t script[] = "var str = 'Hello World'; print(str + ' from JerryScript')";
size_t script_size = strlen ((const char *) script);
ret_value = jerry_parse (script, script_size, false);
ret_value = jerry_parse (NULL, 0, script, script_size, JERRY_PARSE_NO_OPTS);
if (!jerry_value_has_error_flag (ret_value))
{
@@ -415,11 +415,11 @@ int jerry_main (int argc, char *argv[])
return JERRY_STANDALONE_EXIT_CODE_FAIL;
}
ret_value = jerry_parse_named_resource ((jerry_char_t *) file_names[i],
strlen (file_names[i]),
source_p,
source_size,
false);
ret_value = jerry_parse ((jerry_char_t *) file_names[i],
strlen (file_names[i]),
source_p,
source_size,
JERRY_PARSE_NO_OPTS);
if (!jerry_value_has_error_flag (ret_value))
{