Browse Source

Config option changes for regexp bracket parsing

pull/871/head
Sami Vaarala 8 years ago
parent
commit
8569bdd08d
  1. 10
      config/config-options/DUK_USE_ES6_REGEXP_BRACES.yaml
  2. 15
      config/config-options/DUK_USE_ES6_REGEXP_SYNTAX.yaml
  3. 6
      config/config-options/DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE.yaml
  4. 2
      config/examples/compliance.yaml

10
config/config-options/DUK_USE_ES6_REGEXP_BRACES.yaml

@ -1,15 +1,9 @@
define: DUK_USE_ES6_REGEXP_BRACES
feature_enables: DUK_OPT_ES6_REGEXP_BRACES
introduced: 1.5.0
removed: 2.0.0
default: true
tags:
- ecmascript6
description: >
Enable support for unescaped '{' and '}' literals in regular expressions,
which is an ES6 Appendix feature (and non-standard before ES6). Ecmascript
E5 requires literal curly braces to be escaped, but most Ecmascript engines
support them when they are not used in valid quantifier, and this behavior
has been added to ES6 Appendix.
This option is recommended because a lot of existing code depends on literal
regexp braces.
Replaced by DUK_USE_ES6_REGEXP_SYNTAX.

15
config/config-options/DUK_USE_ES6_REGEXP_SYNTAX.yaml

@ -0,0 +1,15 @@
define: DUK_USE_ES6_REGEXP_SYNTAX
feature_enables: DUK_OPT_ES6_REGEXP_SYNTAX
introduced: 2.0.0
default: true
tags:
- ecmascript6
description: >
Enable support for additional RegExp syntax from E6 Section B.1.4, such as:
(1) dollar escape, (2) unescaped curly braces ('{' and '}'), and (3)
unescaped right bracket (']'). This option does not enable all of the ES6
syntax because not all of the extra syntax is implemented; rather, the option
enables whatever ES6 extra syntax has been implemented so far.
This option is recommended because a lot of existing code depends on literal
regexp braces, and other non-ES5 constructs.

6
config/config-options/DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE.yaml

@ -1,12 +1,10 @@
define: DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE
feature_enables: DUK_OPT_NONSTD_REGEXP_DOLLAR_ESCAPE
introduced: 1.0.0
removed: 2.0.0
default: true
tags:
- ecmascript
- compliance
description: >
Enable support for non-standard regexp dollar escape "\$". This option is
recommended because such regexps are used by existing code bases.
# FIXME: RST escaping works poorly now for backslash.
Replaced by DUK_USE_ES6_REGEXP_SYNTAX.

2
config/examples/compliance.yaml

@ -8,6 +8,6 @@ DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY: false
DUK_USE_NONSTD_FUNC_STMT: false
DUK_USE_NONSTD_GETTER_KEY_ARGUMENT: false
DUK_USE_NONSTD_JSON_ESC_U2028_U2029: false
DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE: false
DUK_USE_NONSTD_SETTER_KEY_ARGUMENT: false
DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT: false
DUK_USE_ES6_REGEXP_SYNTAX: false # for ES5 compliance, disable ES6-only regexp extra syntax

Loading…
Cancel
Save