% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/treesitter_helpers.R
\name{tcc_treesitter_union_accessors}
\alias{tcc_treesitter_union_accessors}
\title{Generate tcc_union() accessors from header unions}
\usage{
tcc_treesitter_union_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 union name. Bitfields are returned as
lists with \code{type}, \code{bitfield = TRUE}, and \code{width}. Nested struct members
are returned as \verb{list(type = "struct", struct_name = <name>)} when the
struct name is available, otherwise \code{list(type = "struct")}.
}
\description{
Generate tcc_union() accessors from header unions
}
\examples{
\dontrun{
header <- "union data { int i; double d; };"
tcc_treesitter_union_accessors(header)
}
}
