Skip to content

Commit 6fda738

Browse files
committed
update parser
1 parent 08be269 commit 6fda738

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎fortran_parser/parser.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,7 @@ def _helper_validate_file_scope_unparsed_lines(self, lines: _PreprocessedLines,
11651165
if handled_pp:
11661166
index += 1
11671167
continue
1168+
11681169
start = self._helper_classify_unit_start(stripped)
11691170
if start is not None:
11701171
end_index = self._helper_find_unit_end(lines, index, start[0], filename=filename)
@@ -1188,12 +1189,6 @@ def _is_allowed_unparsed_file_scope_line(line: str) -> bool:
11881189
lowered = stripped.lower()
11891190
return (
11901191
stripped.startswith("#")
1191-
or lowered == "contains"
1192-
or lowered.startswith("end ")
1193-
or lowered.startswith(("endif", "enddo"))
1194-
or lowered == "else"
1195-
or lowered.startswith(("elseif", "else if"))
1196-
or FortranParser._is_ignored_spec_statement(stripped)
11971192
or FortranParser._is_openmp_directive(stripped)
11981193
)
11991194

0 commit comments

Comments
 (0)