Skip to content

Commit c1e723f

Browse files
committed
Added docstring for implicit parse
1 parent 4cd9596 commit c1e723f

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

fortls/parse_fortran.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ def parse(
13181318
if FRegex.NON_DEF.match(line_no_comment):
13191319
continue
13201320
# Mark implicit statement
1321-
if self._parse_implicit(line_no_comment, line_no, file_ast):
1321+
if self.parse_implicit(line_no_comment, line_no, file_ast):
13221322
continue
13231323
# Mark contains statement
13241324
if self.parse_contains(line_no_comment, line_no, file_ast):
@@ -1701,7 +1701,23 @@ def parse_do_fixed_format(
17011701
return True
17021702
return False
17031703

1704-
def _parse_implicit(self, line: str, ln: int, file_ast: fortran_ast):
1704+
def parse_implicit(self, line: str, ln: int, file_ast: fortran_ast) -> bool:
1705+
"""Parse implicit statements from a line
1706+
1707+
Parameters
1708+
----------
1709+
line : str
1710+
Document line
1711+
ln : int
1712+
Line number
1713+
file_ast : fortran_ast
1714+
AST object
1715+
1716+
Returns
1717+
-------
1718+
bool
1719+
True if an IMPLICIT statements present, False otherwise
1720+
"""
17051721
match = FRegex.IMPLICIT.match(line)
17061722
if match is None:
17071723
return False

0 commit comments

Comments
 (0)