parse-enum-elt ( class name counter counter-quot -- counter counter-quot )


Vocabulary
classes.enumeration.private

Inputs
classan object
namean object
counteran object
counter-quotan object


Outputs
counteran object
counter-quotan object


Definition


: 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 ;