[API] Add RegExp C API (#2542)
This patch supports creating a RegExp object through the C API. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
47fa5904b1
commit
704eb45cb8
@@ -110,9 +110,15 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
ECMA_FINALIZE (flags_str_value);
|
||||
}
|
||||
|
||||
uint16_t flags = 0;
|
||||
if (ecma_is_value_empty (ret_value) && (flags_string_p != NULL))
|
||||
{
|
||||
ret_value = re_parse_regexp_flags (flags_string_p, &flags);
|
||||
}
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ret_value = ecma_op_create_regexp_object (pattern_string_p, flags_string_p);
|
||||
ret_value = ecma_op_create_regexp_object (pattern_string_p, flags);
|
||||
}
|
||||
|
||||
if (pattern_string_p != NULL)
|
||||
|
||||
Reference in New Issue
Block a user