From de6dab0e483747cffb92fd7e7ca5f1466723a786 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zsolt=20Borb=C3=A9ly?=
Date: Fri, 11 Jan 2019 13:47:26 +0100
Subject: [PATCH] Update the webpage (#2692)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
---
01.GETTING-STARTED.md | 2 +-
02.API-REFERENCE.md | 88 +++++++++++++++++++++++++++++++++++++++++--
03.API-EXAMPLE.md | 2 +-
05.PORT-API.md | 2 +-
_includes/header.html | 2 +-
index.html | 4 +-
6 files changed, 90 insertions(+), 10 deletions(-)
diff --git a/01.GETTING-STARTED.md b/01.GETTING-STARTED.md
index 9b9c84d21..e60f06e6e 100644
--- a/01.GETTING-STARTED.md
+++ b/01.GETTING-STARTED.md
@@ -61,7 +61,7 @@ python tools/build.py --cmake-param=CMAKE_PARAM
python tools/build.py --profile=es5.1|es2015-subset|minimal
```
-See also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
+See also the related [README.md](https://github.com/pando-project/jerryscript/blob/master/jerry-core/profiles/README.md).
**Use (compiler-default, external) libc**
diff --git a/02.API-REFERENCE.md b/02.API-REFERENCE.md
index cd9b4f949..af85a4e05 100644
--- a/02.API-REFERENCE.md
+++ b/02.API-REFERENCE.md
@@ -72,6 +72,16 @@ Possible compile time enabled feature types:
- JERRY_FEATURE_LINE_INFO - line info available
- JERRY_FEATURE_LOGGING - logging
+## jerry_regexp_flags_t
+
+RegExp object optional flags:
+
+ - JERRY_REGEXP_FLAG_GLOBAL - global match; find all matches rather than stopping after the first match
+ - JERRY_REGEXP_FLAG_IGNORE_CASE - ignore case
+ - JERRY_REGEXP_FLAG_MULTILINE - multiline; treat beginning and end characters (^ and $) as working over
+ multiple lines (i.e., match the beginning or end of each line (delimited by \n or \r), not only the
+ very beginning or end of the whole input string)
+
## jerry_parse_opts_t
Option bits for [jerry_parse](#jerry_parse) and
@@ -3416,6 +3426,76 @@ jerry_create_string_sz (const jerry_char_t *str_p,
- [jerry_create_string_from_utf8](#jerry_create_string_from_utf8)
+## jerry_create_regexp
+
+**Summary**
+
+Returns a jerry_value_t RegExp object or an error, if the construction of the object fails.
+Optional flags can be set using [jerry_regexp_flags_t](#jerry_regexp_flags_t).
+These flags can be combined together with the binary OR operator or used on their own as enum values.
+
+**Prototype**
+```c
+jerry_value_t
+jerry_create_regexp (const jerry_char_t *pattern_p, uint16_t flags);
+```
+
+- `pattern_p` - the RegExp pattern as a zero-terminated UTF-8 string
+- `flags` - optional flags for the RegExp object, see [jerry_regexp_flags_t](#jerry_regexp_flags_t)
+- return value - the RegExp object as a `jerry_value_t`
+
+**Example**
+
+```c
+{
+ jerry_char_t pattern_p = "[cgt]gggtaaa|tttaccc[acg]";
+ uint16_t pattern_flags = JERRY_REGEXP_FLAG_IGNORE_CASE;
+
+ jerry_value_t regexp = jerry_create_regexp (pattern_p, pattern_flags);
+
+ ...
+
+ jerry_release_value (regexp);
+}
+```
+
+
+## jerry_create_regexp_sz
+
+**Summary**
+
+Returns a jerry_value_t RegExp object or an error, if the construction of the object fails.
+Optional flags can be set using [jerry_regexp_flags_t](#jerry_regexp_flags_t).
+These flags can be combined together with the binary OR operator or used on their own as enum values.
+
+**Prototype**
+```c
+jerry_value_t
+jerry_create_regexp_sz (const jerry_char_t *pattern_p, jerry_size_t pattern_size, uint16_t flags);
+```
+
+- `pattern_p` - the RegExp pattern as a zero-terminated UTF-8 string
+- `pattern_size` - size of the `pattern`
+- `flags` - optional flags for the RegExp object, see [jerry_regexp_flags_t](#jerry_regexp_flags_t)
+- return value - the RegExp object as a `jerry_value_t`
+
+**Example**
+
+```c
+{
+ jerry_char_t pattern_p = "[cgt]gggtaaa|tttaccc[acg]";
+ jerry_size_t pattern_size = sizeof (pattern_p) - 1;
+ uint16_t pattern_flags = JERRY_REGEXP_FLAG_IGNORE_CASE;
+
+ jerry_value_t regexp = jerry_create_regexp_sz (pattern_p, pattern_size, pattern_flags);
+
+ ...
+
+ jerry_release_value (regexp);
+}
+```
+
+
## jerry_create_typedarray
**Summary**
@@ -3802,7 +3882,7 @@ jerry_get_property (const jerry_value_t obj_val,
jerry_value_t global_object = jerry_get_global_object ();
jerry_value_t prop_name = jerry_create_string ((const jerry_char_t *) "my_prop");
- jerry_value_t prop_value = jerry_get_property (obj_val, prop_name);
+ jerry_value_t prop_value = jerry_get_property (global_object, prop_name);
jerry_release_value (prop_name);
jerry_release_value (global_object);
@@ -5923,7 +6003,7 @@ jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t strin
}
```
-## jerry_stringify
+## jerry_json_stringify
**Summary**
@@ -5932,7 +6012,7 @@ jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t strin
**Prototype**
```c
-jerry_value_t jerry_json_stringfy (const jerry_value_t object_to_stringify)
+jerry_value_t jerry_json_stringify (const jerry_value_t object_to_stringify)
```
- `object_to_stringify` - a jerry_value_t object to stringify
@@ -5948,7 +6028,7 @@ jerry_value_t jerry_json_stringfy (const jerry_value_t object_to_stringify)
jerry_value_t key = jerry_create_string ((const jerry_char_t *) "name");
jerry_value_t value = jerry_create_string ((const jerry_char_t *) "John");
jerry_set_property (obj, key, value);
- jerry_value_t stringified = jerry_json_stringfy (obj);
+ jerry_value_t stringified = jerry_json_stringify (obj);
//stringified now contains a json formated string
diff --git a/03.API-EXAMPLE.md b/03.API-EXAMPLE.md
index 6e71f8963..65fb95b0e 100644
--- a/03.API-EXAMPLE.md
+++ b/03.API-EXAMPLE.md
@@ -594,4 +594,4 @@ main (void)
## Further steps
-For further API description, please visit [API Reference page](https://jerryscript-project.github.io/jerryscript/api-reference/) on [JerryScript home page](https://jerryscript-project.github.io/jerryscript/).
+For further API description, please visit [API Reference page](https://pando-project.github.io/jerryscript/api-reference/) on [JerryScript home page](https://pando-project.github.io/jerryscript/).
diff --git a/05.PORT-API.md b/05.PORT-API.md
index 9dff1ea7a..e57922de4 100644
--- a/05.PORT-API.md
+++ b/05.PORT-API.md
@@ -35,8 +35,8 @@ Error codes
typedef enum
{
ERR_OUT_OF_MEMORY = 10,
- ERR_SYSCALL = 11,
ERR_REF_COUNT_LIMIT = 12,
+ ERR_DISABLED_BYTE_CODE = 13,
ERR_FAILED_INTERNAL_ASSERTION = 120
} jerry_fatal_code_t;
```
diff --git a/_includes/header.html b/_includes/header.html
index bd8c9dd77..b3f4528c1 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -44,4 +44,4 @@
-
+
diff --git a/index.html b/index.html
index 1b3ce1586..2bf5d742b 100644
--- a/index.html
+++ b/index.html
@@ -17,7 +17,7 @@ permalink: /