Learn R Programming

treesitter.c (version 0.0.4.2)

get_defines_from_file: This function will use the configured C compiler to list macro definitions (-dM -E) if use_cpp = TRUE and a compiler is available; otherwise, a simple scan of #define lines is used as a fallback.

Description

This function will use the configured C compiler to list macro definitions (-dM -E) if use_cpp = TRUE and a compiler is available; otherwise, a simple scan of #define lines is used as a fallback.

Usage

get_defines_from_file(file, use_cpp = TRUE, cc = r_cc(), ccflags = NULL)

Value

Character vector of macro names defined in file

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