Simplify source evaluation options. (#2431)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2018-07-20 08:50:39 +02:00
committed by László Langó
parent 76ff084dc7
commit 77d9314b1d
26 changed files with 88 additions and 79 deletions
+3 -3
View File
@@ -970,12 +970,12 @@ Perform JavaScript `eval`.
jerry_value_t
jerry_eval (const jerry_char_t *source_p,
size_t source_size,
bool is_strict);
uint32_t parse_opts);
```
- `source_p` - source code to evaluate, it must be a valid utf8 string.
- `source_size` - length of the source code
- `is_strict` - perform `eval` as it is called from "strict mode" code.
- `parse_opts` - any combination of [jerry_parse_opts_t](#jerry_parse_opts_t) flags.
- return value - result of eval, may be error value.
**Example**
@@ -984,7 +984,7 @@ jerry_eval (const jerry_char_t *source_p,
{
jerry_value_t ret_val = jerry_eval (str_to_eval,
strlen (str_to_eval),
false);
JERRY_PARSE_NO_OPTS);
}
```