Fixing name offsets.

This commit is contained in:
Alex Shinn 2013-10-20 17:31:05 +09:00
parent eca3895a00
commit 8f9ba977c3

View file

@ -635,7 +635,8 @@
((=> submatch-named)
;; Named submatches just record the name for the current
;; match and rewrite as a non-named submatch.
(set! match-names (cons (cons (cadr sre) current-match) match-names))
(set! match-names
(cons (cons (cadr sre) (+ 1 current-match)) match-names))
(->rx (cons 'submatch (cddr sre)) flags next))
((*=> submatch-named-list)
(set! match-names (cons (cons (cadr sre) current-match) match-names))