Signal error when trying to match against non-existent backref.
original commit: f8a9434cb6d1c3e82742b4090d35d6ebe1ef465d
This commit is contained in:
parent
e41a34ee34
commit
4836b4c50e
|
@ -448,7 +448,16 @@
|
|||
(lambda (i1) (or (sk i1) (loup-or (cdr res))))
|
||||
(lambda () (loup-or (cdr res)))))))
|
||||
((:backref)
|
||||
(let ((backref (cdr (pregexp-list-ref backrefs (cadr re)))))
|
||||
(let* ((c (pregexp-list-ref backrefs (cadr re)))
|
||||
(backref
|
||||
(cond
|
||||
(c => cdr)
|
||||
(else
|
||||
(error
|
||||
'pregexp-match-positions-aux
|
||||
'non-existent-backref
|
||||
re)
|
||||
#f))))
|
||||
(if backref
|
||||
(pregexp-string-match
|
||||
(substring s (car backref) (cdr backref))
|
||||
|
@ -664,4 +673,3 @@
|
|||
|
||||
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user