camfort / fortran-src

Fortran parsing and static analysis infrastructure
https://hackage.haskell.org/package/fortran-src
Other
48 stars 20 forks source link

Add entry point for parsing includes #227

Closed RaoulHC closed 2 years ago

RaoulHC commented 2 years ago

We're refactoring an issue that occurs in include files, and exposing this allows us to directly refactor them.

We may need in future to try and perform some amount of analysis on them (which should doable I believe), but this is sufficient for now.

raehik commented 2 years ago

is this to allow parsing with includes without doing post-parse transformations? Do the transformations make things more awkward?

RaoulHC commented 2 years ago

is this to allow parsing with includes without doing post-parse transformations? Do the transformations make things more awkward?

It's to refactor include files directly. There's no issue with doing transformations, though provided the includes are only non-executable statements (they don't have to be, but they would be a massive pain to use if they include any executable statements), there is no need for transformations.

raehik commented 2 years ago

Thanks, I get it. It looked similar to other existing code, but now I see includes work with [Block]s and use different parsers, so it's sensible.