Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source parsing: consider end program with no program header #1078

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

perazz
Copy link
Contributor

@perazz perazz commented Sep 23, 2024

Address #1075 @ivan-pi.

This PR improves parsing of Fortran programs with no program header.

Note: some very special cases are still not being considered, due to the limitations in the current parser.

For example, the following valid program unit cannot be properly parsed yet, because there is currently no mechanism to flag whether we're currently inside a subroutine or function tree:

subroutine a(i)
   integer :: i
   call other(i+2)
   contains
   subroutine other(j)
      integer :: j
      print *, j
   end 
end
call a(123)
end 

@perazz
Copy link
Contributor Author

perazz commented Sep 29, 2024

Let's wait a bit longer, and then merge if there are no further comments.

@perazz perazz merged commit d92053e into fortran-lang:main Oct 21, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants