jak-project/test/goalc/source_templates/variables/bitfield-enums.gc
water111 ea479bee98
Add enums and some cleanup (#148)
* support enums

* better compiler warnings

* tweaks to build with clang
2020-12-02 19:51:42 -05:00

17 lines
279 B
Common Lisp

(defenum test-bitfield :bitfield #t
(four 2)
(one 0)
(two 1)
)
(deftype type-with-bitfield (basic)
((name basic)
(thing int32)
)
)
(let ((obj (new 'global 'type-with-bitfield)))
(set! (-> obj thing) (test-bitfield one four))
(the uint (-> obj thing))
)