Update the API documentation (#5178)

- Minor fixes, typos, version numbers, etc.
 - Followup fix after "Merge Promise Guard with ESNEXT #4725"
 - Added documentation for the new implemented API functions

JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
This commit is contained in:
László Langó 2024-12-12 20:39:48 +01:00 committed by GitHub
parent 8d44eed661
commit a746a1d29a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 1062 additions and 295 deletions

File diff suppressed because it is too large Load Diff

View File

@ -237,7 +237,7 @@ jerry_module_resolve (const jerry_value_t specifier, /**< module specifier strin
*/
void
jerry_module_cleanup (const jerry_value_t realm) /**< if this argument is object, release only those modules,
* which realm value is equal to this argument. */
* whose realm value is equal to this argument. */
{
#if JERRY_MODULE_SYSTEM
jerry_module_free ((jerry_module_manager_t *) jerry_context_data (&jerry_module_manager), realm);

View File

@ -4295,7 +4295,7 @@ jerry_object_set_native_ptr (jerry_value_t object, /**< object to set native poi
} /* jerry_object_set_native_ptr */
/**
* Checks wether the argument object has a native poitner set for the specified native type info.
* Checks whether the argument object has a native pointer set for the specified native type info.
*
* @return true if the native pointer has been set,
* false otherwise

View File

@ -41,8 +41,8 @@ typedef enum
} jerry_init_flag_t;
/**
* Jerry log levels. The levels are in severity order
* where the most serious levels come first.
* Jerry log levels. The levels are ordered by severity,
* with the most serious levels listed first.
*/
typedef enum
{
@ -86,7 +86,6 @@ typedef enum
JERRY_FEATURE_VM_EXEC_STOP, /**< stopping ECMAScript execution */
JERRY_FEATURE_VM_THROW, /**< capturing ECMAScript throws */
JERRY_FEATURE_JSON, /**< JSON support */
JERRY_FEATURE_PROMISE, /**< promise support */
JERRY_FEATURE_TYPEDARRAY, /**< Typedarray support */
JERRY_FEATURE_DATE, /**< Date support */
JERRY_FEATURE_REGEXP, /**< Regexp support */
@ -315,8 +314,10 @@ typedef void (*jerry_error_object_created_cb_t) (const jerry_value_t error_objec
*
* Note: if the function returns with a non-undefined value it
* must return with the same value for future calls.
*
* @param user_data_p: optional user data pointer
*/
typedef jerry_value_t (*jerry_halt_cb_t) (void *user_p);
typedef jerry_value_t (*jerry_halt_cb_t) (void *user_data_p);
/**
* Callback function which is called when an exception is thrown in an ECMAScript code.
@ -324,13 +325,19 @@ typedef jerry_value_t (*jerry_halt_cb_t) (void *user_p);
* until the value is caught.
*
* Note: the engine considers exceptions thrown by external functions as never caught.
*
* @param exception_value: the thrown exception
* @param user_data_p: optional user data pointer
*/
typedef void (*jerry_throw_cb_t) (const jerry_value_t exception_value, void *user_p);
typedef void (*jerry_throw_cb_t) (const jerry_value_t exception_value, void *user_data_p);
/**
* Function type applied to each unit of encoding when iterating over a string.
*
* @param value: encoded byte value
* @param user_data_p: optional user data pointer
*/
typedef void (*jerry_string_iterate_cb_t) (uint32_t value, void *user_p);
typedef void (*jerry_string_iterate_cb_t) (uint32_t value, void *user_data_p);
/**
* Function type applied for each data property of an object.

View File

@ -36,7 +36,7 @@
#define JERRYX_SYNTAX_ERROR_MAX_LINE_LENGTH 256
/**
* Struct for buffering print outpu
* Struct for buffering print output
*/
typedef struct
{

View File

@ -126,7 +126,7 @@ main (void)
ENTRY (JERRY_OBJECT_TYPE_SCRIPT, PARSE (NULL)),
ENTRY_IF (JERRY_OBJECT_TYPE_MODULE, PARSE (&module_parse_options), JERRY_FEATURE_MODULE),
ENTRY_IF (JERRY_OBJECT_TYPE_PROMISE, jerry_promise (), JERRY_FEATURE_PROMISE),
ENTRY (JERRY_OBJECT_TYPE_PROMISE, jerry_promise ()),
ENTRY_IF (JERRY_OBJECT_TYPE_DATAVIEW, test_dataview (), JERRY_FEATURE_DATAVIEW),
ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (arrow_function), JERRY_FEATURE_SYMBOL),
ENTRY_IF (JERRY_OBJECT_TYPE_FUNCTION, EVALUATE (async_arrow_function), JERRY_FEATURE_SYMBOL),