зеркало из https://github.com/mozilla/gecko-dev.git
Replaced fill-capture by the new repeat primitive
This commit is contained in:
Родитель
49ac14b7f4
Коммит
aee5c157f3
|
@ -141,17 +141,13 @@
|
||||||
(begin
|
(begin
|
||||||
(const m1 matcher ((gen-matcher :disjunction) 0))
|
(const m1 matcher ((gen-matcher :disjunction) 0))
|
||||||
(function (e (t r-e-input) (index integer)) r-e-result
|
(function (e (t r-e-input) (index integer)) r-e-result
|
||||||
(const x r-e-match (new r-e-match index (fill-capture (count-parens :disjunction))))
|
(const x r-e-match (new r-e-match index (repeat capture undefined (count-parens :disjunction))))
|
||||||
(return (m1 t x success-continuation)))
|
(return (m1 t x success-continuation)))
|
||||||
(return e)))))
|
(return e)))))
|
||||||
|
|
||||||
(%print-actions)
|
(%print-actions)
|
||||||
(define (success-continuation (x r-e-match)) r-e-result
|
(define (success-continuation (x r-e-match)) r-e-result
|
||||||
(return x))
|
(return x))
|
||||||
(define (fill-capture (i integer)) (vector capture)
|
|
||||||
(if (= i 0)
|
|
||||||
(return (vector-of capture))
|
|
||||||
(return (append (fill-capture (- i 1)) (vector-of capture undefined)))))
|
|
||||||
|
|
||||||
|
|
||||||
(%heading 2 "Disjunctions")
|
(%heading 2 "Disjunctions")
|
||||||
|
@ -265,6 +261,7 @@
|
||||||
(%charclass :decimal-digit)
|
(%charclass :decimal-digit)
|
||||||
|
|
||||||
|
|
||||||
|
(deftag +infinity)
|
||||||
(deftype limit (union integer (tag +infinity)))
|
(deftype limit (union integer (tag +infinity)))
|
||||||
|
|
||||||
(define (reset-parens (x r-e-match) (p integer) (n-parens integer)) r-e-match
|
(define (reset-parens (x r-e-match) (p integer) (n-parens integer)) r-e-match
|
||||||
|
|
Загрузка…
Ссылка в новой задаче