@@ -42,7 +42,7 @@ private class TPreprocessorBranchDirective = @ppd_branch or @ppd_else or @ppd_en
4242
4343/**
4444 * A C/C++ preprocessor branch related directive: `#if`, `#ifdef`,
45- * `#ifndef`, `#elif`, `#else` or `#endif`.
45+ * `#ifndef`, `#elif`, `#elifdef`, `#elifndef`, `# else` or `#endif`.
4646 */
4747class PreprocessorBranchDirective extends PreprocessorDirective , TPreprocessorBranchDirective {
4848 /**
@@ -74,8 +74,8 @@ class PreprocessorBranchDirective extends PreprocessorDirective, TPreprocessorBr
7474 }
7575
7676 /**
77- * Gets the next `#elif`, `#else` or `#endif` matching this branching
78- * directive.
77+ * Gets the next `#elif`, `#elifdef`, `#elifndef`, `# else` or `#endif` matching
78+ * this branching directive.
7979 *
8080 * For example `somePreprocessorBranchDirective.getIf().getNext()` gets
8181 * the second directive in the same construct as
@@ -88,8 +88,8 @@ class PreprocessorBranchDirective extends PreprocessorDirective, TPreprocessorBr
8888 }
8989
9090 /**
91- * Gets the index of this branching directive within the matching #if,
92- * #ifdef or #ifndef.
91+ * Gets the index of this branching directive within the matching ` #if` ,
92+ * ` #ifdef` or ` #ifndef` .
9393 */
9494 private int getIndexInBranch ( PreprocessorBranch branch ) {
9595 this =
@@ -102,8 +102,8 @@ class PreprocessorBranchDirective extends PreprocessorDirective, TPreprocessorBr
102102}
103103
104104/**
105- * A C/C++ preprocessor branching directive: `#if`, `#ifdef`, `#ifndef`, or
106- * `#elif`.
105+ * A C/C++ preprocessor branching directive: `#if`, `#ifdef`, `#ifndef`,
106+ * `#elif`, `#elifdef`, or `#elifndef` .
107107 *
108108 * A branching directive has a condition and that condition may be evaluated
109109 * at compile-time. As a result, the preprocessor will either take the
@@ -151,8 +151,8 @@ class PreprocessorBranch extends PreprocessorBranchDirective, @ppd_branch {
151151 * #endif
152152 * ```
153153 * For the related notion of a directive which causes branching (which
154- * includes `#if`, plus also `#ifdef`, `#ifndef`, and `#elif`), see
155- * `PreprocessorBranch`.
154+ * includes `#if`, plus also `#ifdef`, `#ifndef`, `#elif`, `#elifdef`,
155+ * and `#elifndef`), see `PreprocessorBranch`.
156156 */
157157class PreprocessorIf extends PreprocessorBranch , @ppd_if {
158158 override string toString ( ) { result = "#if " + this .getHead ( ) }
@@ -222,6 +222,40 @@ class PreprocessorElif extends PreprocessorBranch, @ppd_elif {
222222 override string toString ( ) { result = "#elif " + this .getHead ( ) }
223223}
224224
225+ /**
226+ * A C/C++ preprocessor `#elifdef` directive. For example there is a
227+ * `PreprocessorElifdef` on the third line of the following code:
228+ * ```
229+ * #ifdef MYDEFINE1
230+ * // ...
231+ * #elifdef MYDEFINE2
232+ * // ...
233+ * #else
234+ * // ...
235+ * #endif
236+ * ```
237+ */
238+ class PreprocessorElifdef extends PreprocessorBranch , @ppd_elifdef {
239+ override string toString ( ) { result = "#elifdef " + this .getHead ( ) }
240+ }
241+
242+ /**
243+ * A C/C++ preprocessor `#elifndef` directive. For example there is a
244+ * `PreprocessorElifndef` on the third line of the following code:
245+ * ```
246+ * #ifdef MYDEFINE1
247+ * // ...
248+ * #elifndef MYDEFINE2
249+ * // ...
250+ * #else
251+ * // ...
252+ * #endif
253+ * ```
254+ */
255+ class PreprocessorElifndef extends PreprocessorBranch , @ppd_elifndef {
256+ override string toString ( ) { result = "#elifndef " + this .getHead ( ) }
257+ }
258+
225259/**
226260 * A C/C++ preprocessor `#endif` directive. For example there is a
227261 * `PreprocessorEndif` on the third line of the following code:
0 commit comments