Commit b34363d
Do not require parentheses for the 'defined' preprocessor operator
The regex that checks for preprocessor macros using the 'defined'
operator assumes that the macro that follows the operator is between
parenthesis. However, the syntax for the 'defined' operator does not
require parenthesis, at least in GNU Cpp [1] and Intel fpp [2], arguably
the two most commonly used Fortran preprocessors.
Tweak the regex by allowing the opening and closing parenthesis zero or
once.
[1] https://gcc.gnu.org/onlinedocs/gcc-10.2.0/cpp/Defined.html#Defined
[2] https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/optimization-and-programming-guide/fpp-preprocessing/using-fpp-preprocessor-directives.html1 parent 085092c commit b34363d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments