mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
Adding missing nwb support.
This commit is contained in:
parent
53c7dfd71e
commit
bca1281acb
2 changed files with 7 additions and 0 deletions
|
@ -532,6 +532,9 @@
|
|||
(string-cursor>? i start)
|
||||
(char-word-constituent?
|
||||
(string-cursor-ref str (string-cursor-prev str i)))))
|
||||
(define (match/nwb str i ch start end matches)
|
||||
(and (not (match/bow str i ch start end matches))
|
||||
(not (match/eow str i ch start end matches))))
|
||||
(define (match/bog str i ch start end matches)
|
||||
(and (string-cursor<? i end)
|
||||
(or (string-cursor=? i start)
|
||||
|
@ -718,6 +721,7 @@
|
|||
((eol) (make-char-state match/eol flags next))
|
||||
((bow) (make-char-state match/bow flags next))
|
||||
((eow) (make-char-state match/eow flags next))
|
||||
((nwb) (make-char-state match/nwb flags next))
|
||||
((bog) (make-char-state match/bog flags next))
|
||||
((eog) (make-char-state match/eog flags next))
|
||||
((grapheme)
|
||||
|
|
|
@ -142,6 +142,9 @@
|
|||
(test-re #f
|
||||
'(: (* space) bow ($ (* alpha)) eow (* space))
|
||||
" abc. ")
|
||||
(test-re-search '("foo") '(: "foo") " foo ")
|
||||
(test-re-search #f '(: nwb "foo" nwb) " foo ")
|
||||
(test-re-search '("foo") '(: nwb "foo" nwb) "xfoox")
|
||||
|
||||
(test-re '("beef")
|
||||
'(* (/"af"))
|
||||
|
|
Loading…
Add table
Reference in a new issue