Add missing symbols to regex (#20383)

* Add missing attribute to jsre

* Add missing attribute to jsre
This commit is contained in:
Juan Carlos 2022-09-19 18:47:39 -03:00 • committed by GitHub
commit c8000b1025
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -69,6 +69,7 @@
in `jscore` for JavaScript targets. in `jscore` for JavaScript targets.
- Added `UppercaseLetters`, `LowercaseLetters`, `PunctuationChars`, `PrintableChars` sets to `std/strutils`. - Added `UppercaseLetters`, `LowercaseLetters`, `PunctuationChars`, `PrintableChars` sets to `std/strutils`.
- Added `complex.sgn` for obtaining the phase of complex numbers. - 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:" [//]: # "Deprecations:"
- Deprecated `selfExe` for Nimscript. - Deprecated `selfExe` for Nimscript.

View file

@ -20,6 +20,7 @@ type RegExp* = ref object of JsRoot
lastParen*: cstring ## Ditto. lastParen*: cstring ## Ditto.
leftContext*: cstring ## Ditto. leftContext*: cstring ## Ditto.
rightContext*: 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(@)".} func newRegExp*(pattern: cstring; flags: cstring): RegExp {.importjs: "new RegExp(@)".}