Add missing symbols to regex (#20383)
* Add missing attribute to jsre * Add missing attribute to jsre
This commit is contained in:
parent
7023176dcb
commit
c8000b1025
2 changed files with 5 additions and 3 deletions
|
|
@ -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.
|
||||||
|
|
@ -137,10 +138,10 @@
|
||||||
added to make this work explicitly, and a warning is generated in the case
|
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
|
where it is implicit. This behavior only applies to templates, redefinition
|
||||||
is generally disallowed for other symbols.
|
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)
|
- 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:
|
has been implemented for a variety of basic cases. For example, code like the following now compiles:
|
||||||
|
|
||||||
```nim
|
```nim
|
||||||
let foo: seq[(float, byte, cstring)] = @[(1, 2, "abc")]
|
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
|
- 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".)
|
reality better. (Nim moved away from all techniques based on "tracing".)
|
||||||
|
|
||||||
- Defines the `gcRefc` symbol which allows writing specific code for the refc GC.
|
- 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`,
|
- `nim` can now compile version 1.4.0 as follows: `nim c --lib:lib --stylecheck:off compiler/nim`,
|
||||||
|
|
|
||||||
|
|
@ -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(@)".}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue