Skip to content

Commit 00a71c3

Browse files
authored
Merge pull request #67 from andrewbest/master
Added rank
2 parents c27fff4 + bb44324 commit 00a71c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fprettify/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
- if, else, endif
4242
- do, enddo
4343
- select case, case, end select
44+
- select rank, rank, end select
4445
- subroutine, end subroutine
4546
- function, end function
4647
- module, end module
@@ -121,9 +122,9 @@
121122
ENDDO_RE = re.compile(SOL_STR + r"END\s*DO(\s+\w+)?" + EOL_STR, RE_FLAGS)
122123

123124
SELCASE_RE = re.compile(
124-
SOL_STR + r"SELECT\s*(CASE|TYPE)\s*\(.*\)" + EOL_STR, RE_FLAGS)
125+
SOL_STR + r"SELECT\s*(CASE|RANK|TYPE)\s*\(.*\)" + EOL_STR, RE_FLAGS)
125126
CASE_RE = re.compile(
126-
SOL_STR + r"((CASE|TYPE\s+IS|CLASS\s+IS)\s*(\(.*\)|DEFAULT)|CLASS\s+DEFAULT)" + EOL_STR, RE_FLAGS)
127+
SOL_STR + r"((CASE|RANK|TYPE\s+IS|CLASS\s+IS)\s*(\(.*\)|DEFAULT)|CLASS\s+DEFAULT)" + EOL_STR, RE_FLAGS)
127128
ENDSEL_RE = re.compile(SOL_STR + r"END\s*SELECT" + EOL_STR, RE_FLAGS)
128129

129130
ASSOCIATE_RE = re.compile(SOL_STR + r"ASSOCIATE\s*\(.*\)" + EOL_STR, RE_FLAGS)
@@ -785,6 +786,8 @@ def add_whitespace_charwise(line, spacey, filename, line_nr):
785786
line[:pos], RE_FLAGS) or
786787
re.search(SOL_STR + r"(SELECT)?\s*CASE\s*$",
787788
line[:pos], RE_FLAGS) or
789+
re.search(SOL_STR + r"(SELECT)?\s*RANK\s*$",
790+
line[:pos], RE_FLAGS) or
788791
re.search(SOL_STR + r"SELECT\s*TYPE\s*$",
789792
line[:pos], RE_FLAGS) or
790793
re.search(SOL_STR + r"CLASS\s*DEFAULT\s*$",

0 commit comments

Comments
 (0)