Handbook
Glossary
define-enum-elt-word ( class name counter overwrite? -- counter )
Vocabulary
classes
.
enumeration
.
private
Inputs
class
an
object
name
an
object
counter
an
object
overwrite?
an
object
Outputs
counter
an
object
Definition
USING:
accessors
compiler.units
kernel
make
parser
sequences
words
words.constant
;
IN:
classes.enumeration.private
:
define-enum-elt-word
( class name counter overwrite? -- counter )
[
[
[
[
46
prefix
[
dup
name>>
]
dip
append
create-word-in
]
dip
[
define-constant
]
keepd
swap
[
"parent-enum"
set-word-prop
]
keepd
]
keep
[
[
swap
,,
]
[
[
"enum-elt-value"
set-word-prop
]
keepd
[
f
"parsing-word"
set-word-prop
]
keep
]
2bi
]
keep
]
dip
swap
[
"enum-value-overwritten"
set-word-prop
]
dip
]
with-nested-compilation-unit
;