Make structs packed by default

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
Slendi 2024-05-04 12:40:12 +02:00
parent 9505d1c010
commit 137e36b81c

View File

@ -141,11 +141,11 @@ parser_parse_struct_definition :: proc(parser: ^Parser) -> ^Node {
expect(parser, .Identifier)
return nil
}
is_packed := false
is_packed := true
if parser.tok.kind == .String {
value := parser.tok.value.([dynamic]u8)
if compare_dyn_arr_string(&value, "packed") {
is_packed = true
if compare_dyn_arr_string(&value, "unpacked") {
is_packed = false
} else {
panic("TODO, unknown struct attribute")
}