 
 GENERIC: enum>number ( enum -- number ) foldable
 M: integer enum>number ;
+M: symbol enum>number "enum-value" word-prop ;
 
 <PRIVATE
 : enum-boxer ( members -- quot )

! (c)2010 Joe Groff, Erik Charlebois bsd license
USING: accessors alien.c-types arrays classes.singleton combinators
delegate fry generic.parser kernel macros math parser sequences words ;
IN: alien.enums

<PRIVATE


<PRIVATE

: define-enum-value ( class value -- )
    "enum-value" set-word-prop ;

: define-enum-members ( member-names -- )
    [
        [ first define-symbol ]
        [ first2 define-enum-value ] bi
    ] each ;

: define-enum-constructor ( word -- )
