View source: R/treesitter_helpers.R
| tcc_treesitter_bindings | R Documentation |
Generate bindings from a header
tcc_treesitter_bindings(
header,
mapper = tcc_map_c_type_to_ffi,
ffi = NULL,
functions = TRUE,
structs = FALSE,
unions = FALSE,
enums = FALSE,
globals = FALSE,
bitfield_type = "u8",
include_bitfields = TRUE
)
header |
Character scalar containing C declarations. |
mapper |
Function to map C types to FFI types. |
ffi |
Optional |
functions |
Logical; generate |
structs |
Logical; generate |
unions |
Logical; generate |
enums |
Logical; generate |
globals |
Logical; generate |
bitfield_type |
FFI type to use for bitfields. |
include_bitfields |
Whether to include bitfields. |
Named list suitable for tcc_bind() when ffi is NULL, otherwise
an updated tcc_ffi object.
## Not run:
header <- "double sqrt(double x);"
symbols <- tcc_treesitter_bindings(header)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.