bit_field; Lexical sugar operators ≠ ≤ ≥

Example below:
// See: https://en.wikipedia.org/wiki/Bit_field
BoxProps :: bit_field {
	opaque        : 1,
	fill_colour   : 3,
	_             : 4,
	show_border   : 1,
	border_colour : 3,
	border_style  : 2,
	_             : 2,
	width         : 4,
	height        : 4,
	_             : 8,
}
This commit is contained in:
Ginger Bill
2017-06-03 22:27:23 +01:00
parent 9d1a4c304a
commit 2c0e59ae06
16 changed files with 979 additions and 110 deletions
+5
View File
@@ -98,6 +98,11 @@ TypeInfo :: union {
generated_struct: ^TypeInfo,
count: int, // == 0 if dynamic
},
BitField{
names: []string,
bits: []i32,
offsets: []i32,
},
}