View source: R/treesitter_helpers.R
| tcc_treesitter_struct_accessors | R Documentation |
Generate tcc_struct() accessors from header structs
tcc_treesitter_struct_accessors(
header,
mapper = tcc_map_c_type_to_ffi,
bitfield_type = "u8",
include_bitfields = TRUE
)
header |
Character scalar containing C declarations. |
mapper |
Function to map C types to FFI types. |
bitfield_type |
FFI type to use for bitfields. |
include_bitfields |
Whether to include bitfields. |
Named list of accessors by struct name. Bitfields are returned as
lists with type, bitfield = TRUE, and width. Named nested struct
fields are returned as "struct:<name>"; ambiguous or anonymous nested
structs fall back to "ptr".
## Not run:
header <- "struct point { double x; double y; };"
tcc_treesitter_struct_accessors(header)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.