slang::parsing::PreprocessorOptions struct

Contains various options that can control preprocessing behavior.

Public variables

uint32_t maxIncludeDepth
std::string predefineSource
std::vector<std::string> predefines
std::vector<std::string> undefines
A set of macro names to undefine at the start of file preprocessing.
flat_hash_set<std::string_view> ignoreDirectives
A set of preprocessor directives to be ignored.

Variable documentation

uint32_t slang::parsing::PreprocessorOptions::maxIncludeDepth

The maximum depth of the include stack; further attempts to include a file will result in an error.

std::string slang::parsing::PreprocessorOptions::predefineSource

The name to associate with errors produced by macros specified via the predefines option.

std::vector<std::string> slang::parsing::PreprocessorOptions::predefines

A set of macros to predefine, of the form <macro>=<value> or just <macro> to predefine to a value of 1.