View source: R/treesitter_helpers.R
| tcc_treesitter_enum_bindings | R Documentation |
Apply tcc_enum() bindings from a header
tcc_treesitter_enum_bindings(ffi, header, constants = NULL)
ffi |
A tcc_ffi object. |
header |
Character scalar containing C declarations. |
constants |
Named list of enum constants. |
Updated tcc_ffi object.
## Not run:
header <- "enum status { OK = 0, ERR = 1 };"
ffi <- tcc_ffi()
ffi <- tcc_treesitter_enum_bindings(ffi, header, constants = list(status = c("OK", "ERR")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.