MCPcopy Create free account
hub / github.com/csyonghe/Spire / HandleIfDirective

Function HandleIfDirective

Source/SpireCore/Preprocessor.cpp:1229–1236  ·  view source on GitHub ↗

Handle a `#if` directive

Source from the content-addressed store, hash-verified

1227
1228// Handle a `#if` directive
1229static void HandleIfDirective(PreprocessorDirectiveContext* context)
1230{
1231 // Parse a preprocessor expression.
1232 PreprocessorExpressionValue value = ParseAndEvaluateExpression(context);
1233
1234 // Begin a preprocessor block, enabled based on the expression.
1235 BeginConditional(context, value != 0);
1236}
1237
1238// Handle a `#ifdef` directive
1239static void HandleIfDefDirective(PreprocessorDirectiveContext* context)

Callers

nothing calls this directly

Calls 2

BeginConditionalFunction · 0.85

Tested by

no test coverage detected