Skip to content

Commit

Permalink
Merge pull request #67 from andrewbest/master
Browse files Browse the repository at this point in the history
Added rank
  • Loading branch information
pseewald authored Apr 9, 2020
2 parents c27fff4 + bb44324 commit 00a71c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fprettify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- if, else, endif
- do, enddo
- select case, case, end select
- select rank, rank, end select
- subroutine, end subroutine
- function, end function
- module, end module
Expand Down Expand Up @@ -121,9 +122,9 @@
ENDDO_RE = re.compile(SOL_STR + r"END\s*DO(\s+\w+)?" + EOL_STR, RE_FLAGS)

SELCASE_RE = re.compile(
SOL_STR + r"SELECT\s*(CASE|TYPE)\s*\(.*\)" + EOL_STR, RE_FLAGS)
SOL_STR + r"SELECT\s*(CASE|RANK|TYPE)\s*\(.*\)" + EOL_STR, RE_FLAGS)
CASE_RE = re.compile(
SOL_STR + r"((CASE|TYPE\s+IS|CLASS\s+IS)\s*(\(.*\)|DEFAULT)|CLASS\s+DEFAULT)" + EOL_STR, RE_FLAGS)
SOL_STR + r"((CASE|RANK|TYPE\s+IS|CLASS\s+IS)\s*(\(.*\)|DEFAULT)|CLASS\s+DEFAULT)" + EOL_STR, RE_FLAGS)
ENDSEL_RE = re.compile(SOL_STR + r"END\s*SELECT" + EOL_STR, RE_FLAGS)

ASSOCIATE_RE = re.compile(SOL_STR + r"ASSOCIATE\s*\(.*\)" + EOL_STR, RE_FLAGS)
Expand Down Expand Up @@ -785,6 +786,8 @@ def add_whitespace_charwise(line, spacey, filename, line_nr):
line[:pos], RE_FLAGS) or
re.search(SOL_STR + r"(SELECT)?\s*CASE\s*$",
line[:pos], RE_FLAGS) or
re.search(SOL_STR + r"(SELECT)?\s*RANK\s*$",
line[:pos], RE_FLAGS) or
re.search(SOL_STR + r"SELECT\s*TYPE\s*$",
line[:pos], RE_FLAGS) or
re.search(SOL_STR + r"CLASS\s*DEFAULT\s*$",
Expand Down

0 comments on commit 00a71c3

Please sign in to comment.