% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/treesitter_helpers.R
\name{tcc_treesitter_struct_accessors}
\alias{tcc_treesitter_struct_accessors}
\title{Generate tcc_struct() accessors from header structs}
\usage{
tcc_treesitter_struct_accessors(
  header,
  mapper = tcc_map_c_type_to_ffi,
  bitfield_type = "u8",
  include_bitfields = TRUE
)
}
\arguments{
\item{header}{Character scalar containing C declarations.}

\item{mapper}{Function to map C types to FFI types.}

\item{bitfield_type}{FFI type to use for bitfields.}

\item{include_bitfields}{Whether to include bitfields.}
}
\value{
Named list of accessors by struct name. Bitfields are returned as
lists with \code{type}, \code{bitfield = TRUE}, and \code{width}. Named nested struct
fields are returned as \code{"struct:<name>"}; ambiguous or anonymous nested
structs fall back to \code{"ptr"}.
}
\description{
Generate tcc_struct() accessors from header structs
}
\examples{
\dontrun{
header <- "struct point { double x; double y; };"
tcc_treesitter_struct_accessors(header)
}
}
