gobject-ast 0.1.2

AST representation of GObject C code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::Serialize;

use crate::model::SourceLocation;

/// A `(struct_type, field)` pair — used by `offsetof()` and `G_STRUCT_OFFSET`.
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct OffsetField {
    pub struct_type: String,
    pub field: String,
}

#[derive(Debug, Clone, Serialize)]
pub struct OffsetOfExpression {
    pub struct_field: OffsetField,
    pub location: SourceLocation,
}