Skip to content

Commit 83572c9

Browse files
author
Dionysios Grapsas
committed
formatting
1 parent c15a1be commit 83572c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

fortls/parsers/internal/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ def parse(
13811381
file_ast.end_scope_regex == FRegex.END_SELECT
13821382
and (
13831383
FRegex.SELECT_CASE.match(line_no_comment)
1384-
or FRegex.SELECT_DEFAULT.match(line_no_comment)
1384+
or FRegex.CASE_DEFAULT.match(line_no_comment)
13851385
)
13861386
is not None
13871387
):

fortls/regex_patterns.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class FortranRegularExpressions:
148148
)
149149
ELSE_IF: Pattern = compile(r"(^|.*\s)(ELSE$|ELSE(\s)|ELSEIF(\s*\())", I)
150150
SELECT_CASE: Pattern = compile(r"((^|\s*\s)(CASE)(\s*\())", I)
151+
CASE_DEFAULT: Pattern = compile(r"[ ]*CASE[ ]+DEFAULT", I)
151152
# Object regex patterns
152153
CLASS_VAR: Pattern = compile(r"(TYPE|CLASS)[ ]*\(", I)
153154
DEF_KIND: Pattern = compile(r"(\w*)[ ]*\((?:KIND|LEN)?[ =]*(\w*)", I)

0 commit comments

Comments
 (0)