Skip to content

Commit 39d67cb

Browse files
committed
Refactor parsing: immediately skip commented lines
1 parent 0806c9e commit 39d67cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fpm_source_parsing.f90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ function parse_f_source(f_filename,error) result(f_source)
105105
n_mod = 0
106106
file_loop: do i=1,size(file_lines_lower)
107107

108+
! Skip comment lines
109+
if (index(file_lines_lower(i)%s,'!') == 1) then
110+
cycle
111+
end if
112+
108113
! Skip lines that are continued: not statements
109114
if (i > 1) then
110115
ic = index(file_lines_lower(i-1)%s,'!')

0 commit comments

Comments
 (0)