gobject_ast/model/expression/offsetof.rs
1use serde::Serialize;
2
3use crate::model::SourceLocation;
4
5/// A `(struct_type, field)` pair — used by `offsetof()` and `G_STRUCT_OFFSET`.
6#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
7pub struct OffsetField {
8 pub struct_type: String,
9 pub field: String,
10}
11
12#[derive(Debug, Clone, Serialize)]
13pub struct OffsetOfExpression {
14 pub struct_field: OffsetField,
15 pub location: SourceLocation,
16}