Handbook
Glossary
capture-group
Vocabulary
regexp
.
ast
Definition
IN:
regexp.ast
TUPLE:
capture-group
term name
;
Methods
USING:
accessors
regexp.ast
regexp.nfa
;
M:
capture-group
nfa-node
term>>
nfa-node
;
USING:
accessors
assocs
kernel
math
namespaces
regexp.ast
regexp.captures
regexp.captures.private
sequences
;
M::
capture-group
number-captures
( ast -- ast' )
capture-number
get
first
1
+
:>
index index 0
capture-number
get
set-nth
ast
name>>
:>
name name
[
name
capture-names
get
key?
[
name
duplicate-capture-name
]
when
index name
capture-names
get
set-at
]
when
ast
term>>
number-captures
captures-enabled?
get
[
name index
numbered-capture
boa
]
when
;