Handbook
Glossary
parse-enum-elt ( class name counter counter-quot -- counter counter-quot )
Vocabulary
classes
.
enumeration
.
private
Inputs
class
an
object
name
an
object
counter
an
object
counter-quot
an
object
Outputs
counter
an
object
counter-quot
an
object
Definition
USING:
combinators
kernel
parser
sequences
;
IN:
classes.enumeration.private
:
parse-enum-elt
( class name counter counter-quot -- counter counter-quot )
pick
{
{
"{"
[
nipd
scan-word-name
-rot
\
}
parse-until
2
index-or-length
head
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
2nip
first2
dup
]
}
cond
[
define-enum-elt-word
]
dip
]
}
[
drop
[
f
define-enum-elt-word
]
dip
]
}
case
[
( current -- next )
call-effect
]
keep
;