Skip to contents

Extract macro defines from a header file

Usage

tcc_treesitter_defines(
  file,
  use_cpp = TRUE,
  cc = treesitter.c::r_cc(),
  ccflags = NULL
)

Arguments

file

Path to a header file.

use_cpp

Logical; use the C preprocessor if available.

cc

Compiler string; passed to system2() if use_cpp = TRUE.

ccflags

Additional flags for the compiler.

Value

Character vector of macro names defined in file.

Examples

if (FALSE) { # \dontrun{
tcc_treesitter_defines("/usr/include/math.h")
} # }