Skip to content

Commit 412cade

Browse files
committed
fix: preprocessor indexing error in #elif parsing
1 parent a5d6e8f commit 412cade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fortls/parse_fortran.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ def replace_vars(line: str):
21412141
exc_start = True
21422142
else:
21432143
if eval_pp_if(line[match.end(1) :], defs_tmp):
2144-
pp_stack[-1][1] = i - 1
2144+
pp_stack[-1][1] = i + 1
21452145
pp_skips.append(pp_stack.pop())
21462146
pp_stack.append([-1, -1])
21472147
inc_start = True

0 commit comments

Comments
 (0)