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) expect(parser, .Identifier)
return nil return nil
} }
is_packed := false is_packed := true
if parser.tok.kind == .String { if parser.tok.kind == .String {
value := parser.tok.value.([dynamic]u8) value := parser.tok.value.([dynamic]u8)
if compare_dyn_arr_string(&value, "packed") { if compare_dyn_arr_string(&value, "unpacked") {
is_packed = true is_packed = false
} else { } else {
panic("TODO, unknown struct attribute") panic("TODO, unknown struct attribute")
} }