diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2022-09-19 18:47:39 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 17:47:39 -0400 |
commit | c8000b1025b7383066cbaab282772d4a11ab197e (patch) | |
tree | b820a6c31e931db8b8531fd76e31f6d3a3afb093 | |
parent | 7023176dcbc557907f5842f0a4f90b5774735e1e (diff) | |
download | Nim-c8000b1025b7383066cbaab282772d4a11ab197e.tar.gz |
Add missing symbols to regex (#20383)
* Add missing attribute to jsre * Add missing attribute to jsre
-rw-r--r-- | changelog.md | 7 | ||||
-rw-r--r-- | lib/js/jsre.nim | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index 8d574f2b0..5fb58718c 100644 --- a/changelog.md +++ b/changelog.md @@ -69,6 +69,7 @@ in `jscore` for JavaScript targets. - Added `UppercaseLetters`, `LowercaseLetters`, `PunctuationChars`, `PrintableChars` sets to `std/strutils`. - Added `complex.sgn` for obtaining the phase of complex numbers. +- Added [`jsre.hasIndices`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices) [//]: # "Deprecations:" - Deprecated `selfExe` for Nimscript. @@ -137,10 +138,10 @@ added to make this work explicitly, and a warning is generated in the case where it is implicit. This behavior only applies to templates, redefinition is generally disallowed for other symbols. - + - A new form of type inference called [top-down inference](https://nim-lang.github.io/Nim/manual_experimental.html#topminusdown-type-inference) has been implemented for a variety of basic cases. For example, code like the following now compiles: - + ```nim let foo: seq[(float, byte, cstring)] = @[(1, 2, "abc")] ``` @@ -153,7 +154,7 @@ - The `gc` switch has been renamed to `mm` ("memory management") in order to reflect the reality better. (Nim moved away from all techniques based on "tracing".) - + - Defines the `gcRefc` symbol which allows writing specific code for the refc GC. - `nim` can now compile version 1.4.0 as follows: `nim c --lib:lib --stylecheck:off compiler/nim`, diff --git a/lib/js/jsre.nim b/lib/js/jsre.nim index 0cc2f8a87..19888aaa9 100644 --- a/lib/js/jsre.nim +++ b/lib/js/jsre.nim @@ -20,6 +20,7 @@ type RegExp* = ref object of JsRoot lastParen*: cstring ## Ditto. leftContext*: cstring ## Ditto. rightContext*: cstring ## Ditto. + hasIndices*: bool ## https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices func newRegExp*(pattern: cstring; flags: cstring): RegExp {.importjs: "new RegExp(@)".} |