mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
Fixing a bug in regexp-match not properly matching to the end of the string.
This commit is contained in:
parent
205c60a807
commit
781c7b45b0
2 changed files with 5 additions and 4 deletions
|
@ -397,9 +397,10 @@
|
|||
;; Terminate when the string is done or there are no more
|
||||
;; searchers. If we terminate prematurely and are not
|
||||
;; searching, return false.
|
||||
(and (or search? (string-cursor>=? i end))
|
||||
(searcher? (cdr accept))
|
||||
(searcher-matches (cdr accept))))
|
||||
(and (searcher? (cdr accept))
|
||||
(let ((matches (searcher-matches (cdr accept))))
|
||||
(and (or search? (>= (rx-match-ref matches 1) end))
|
||||
(searcher-matches (cdr accept))))))
|
||||
(else
|
||||
;; Otherwise advance normally.
|
||||
(let ((ch (string-cursor-ref str i))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
rx-match? rx-match-num-matches
|
||||
rx-match-submatch rx-match-submatch/list
|
||||
rx-match->list rx-match->sexp)
|
||||
(import (scheme base) (srfi 9) (srfi 33) (srfi 38) (srfi 69))
|
||||
(import (srfi 9) (srfi 33) (srfi 38) (srfi 69))
|
||||
;; Chibi's char-set library is more factored than SRFI-14.
|
||||
(cond-expand
|
||||
(chibi
|
||||
|
|
Loading…
Add table
Reference in a new issue