Skip to content

Commit

Permalink
#437 changes for review
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Apr 22, 2024
1 parent 2bfe704 commit 9067315
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/fparser/two/Fortran2003.py
Original file line number Diff line number Diff line change
Expand Up @@ -7678,14 +7678,14 @@ class Type_Guard_Stmt(StmtBase): # R823
def match(string):
"""Implements the matching of a Type_Guard_Stmt rule.
param str string: a string containing the code that we are
trying to match.
:param str string: the code that we are trying to match.
:returns: a 3-tuple, containing the guard rules as a string,
:returns: a 3-tuple, containing the guard rule as a string (one of
'TYPE IS', 'CLASS IS' or 'CLASS DEFAULT'),
followed by an optional Type_Spec and an optional
Select_Construct_Name. Returns None if there is no match.
:rtype: Optional[str, Optional[:py:class:`fparser.two.Type_Spec`],
Optional[:py:class:`fparser.two.Select_Construct_Name`]]
:rtype: Optional[Tuple[str, Optional[:py:class:`fparser.two.Type_Spec`],
Optional[:py:class:`fparser.two.Select_Construct_Name`]]]
"""
string = string.lstrip()
Expand All @@ -7703,8 +7703,6 @@ def match(string):
elif line[:7].upper() == "DEFAULT":
line = line[7:].lstrip()
if line:
# if isalnum(line[0]):
# return None
return "CLASS DEFAULT", None, Select_Construct_Name(line)
return "CLASS DEFAULT", None, None
else:
Expand Down

0 comments on commit 9067315

Please sign in to comment.