Skip to content

Commit 17f5541

Browse files
committed
revert nfa macro
1 parent 63cea18 commit 17f5541

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/regex/nfamacro.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func genMatchedBody(
305305
parent: `captx`,
306306
bound: `charIdx`,
307307
idx: `zIdx`))
308-
`captx` = (len(`capts`) - 1).CaptIdx
308+
`captx` = (len(`capts`) - 1).int32
309309
of assertionKind - lookaroundKind:
310310
let matchCond = if mfBwMatch in flags:
311311
genMatch(z, c, cPrev)
@@ -477,7 +477,7 @@ func matchImpl(
477477
`cPrev` = -1'i32
478478
`i` = `start`
479479
iNext = `start`
480-
`captx` {.used.} = -1.CaptIdx
480+
`captx` {.used.} = -1'i32
481481
if `start`-1 in 0 .. `text`.len-1:
482482
`cPrev` = bwRuneAt(`text`, `start`-1).int32
483483
clear(`smA`)
@@ -528,7 +528,7 @@ func reversedMatchImpl(
528528
`cPrev` = -1'i32
529529
`i` = `start`
530530
iNext = `start`
531-
`captx` {.used.} = -1.CaptIdx
531+
`captx` {.used.} = -1'i32
532532
if `start` in 0 .. `text`.len-1:
533533
`cPrev` = runeAt(`text`, `start`).int32
534534
clear(`smA`)
@@ -591,7 +591,7 @@ proc matchImpl*(text, expLit, body: NimNode): NimNode =
591591
`smA` = newSubmatches `nfaLenLit`
592592
`smB` = newSubmatches `nfaLenLit`
593593
`capts` = default(Capts)
594-
`capt` = -1.CaptIdx
594+
`capt` = -1'i32
595595
`matched` = false
596596
`smL` {.used.} = default(SmLookaround)
597597
`matchImplStmt`

0 commit comments

Comments
 (0)