mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-20 08:26:47 +00:00
@@ -861,6 +861,7 @@ Bit_Field_Field :: struct {
|
||||
name: ^Expr,
|
||||
type: ^Expr,
|
||||
bit_size: ^Expr,
|
||||
tag: tokenizer.Token,
|
||||
comments: ^Comment_Group,
|
||||
}
|
||||
|
||||
|
||||
@@ -2832,11 +2832,17 @@ parse_operand :: proc(p: ^Parser, lhs: bool) -> ^ast.Expr {
|
||||
expect_token(p, .Or)
|
||||
bit_size := parse_expr(p, true)
|
||||
|
||||
tag: tokenizer.Token
|
||||
if p.curr_tok.kind == .String {
|
||||
tag = expect_token(p, .String)
|
||||
}
|
||||
|
||||
field := ast.new(ast.Bit_Field_Field, name.pos, bit_size)
|
||||
|
||||
field.name = name
|
||||
field.type = type
|
||||
field.bit_size = bit_size
|
||||
field.tag = tag
|
||||
|
||||
append(&fields, field)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user