We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Given a nested pre-processor block like this:
#if 0 #if 1 #define FOO 1 #endif #endif
FOO is incorrectly defined to 1. fortls seems to only take the innermost #if into account and ignores that the outer #if statement evaluates to false.
FOO
1
fortls
#if
false
To Reproduce Given the example above is written to a file pp-nested-if.F90. Executing
pp-nested-if.F90
python -m fortls --debug_filepath=pp-nested-if.F90 --debug_parser
gives
=== PreProc Pass === #if 0 !!! Conditional FALSE(1) #if 1 !!! Conditional TRUE(2) #define FOO 1 !!! Define statement(3) #endif !!! Conditional TRUE/END(4) #endif !!! Conditional FALSE/END(5) === Parsing Pass ===
which shows that the line #define FOO 1 is evaluated.
#define FOO 1
Expected behavior FOO should not be defined.
Setup information (please complete the following information):
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Given a nested pre-processor block like this:
FOO
is incorrectly defined to1
.fortls
seems to only take the innermost#if
into account and ignores that the outer#if
statement evaluates tofalse
.To Reproduce
Given the example above is written to a file
pp-nested-if.F90
. Executinggives
which shows that the line
#define FOO 1
is evaluated.Expected behavior
FOO
should not be defined.Setup information (please complete the following information):
The text was updated successfully, but these errors were encountered: