implement bitsize pragma for bitfields

This commit is contained in:
Aman Gupta 2015-09-28 14:34:36 -07:00
commit 5e9ce88daf
5 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,7 @@
type
bits* = object
flag* {.bitsize: 1.}: cint
opts* {.bitsize: 4.}: cint
var b: bits
echo b.flag