fortran-lang / fortls

fortls - Fortran Language Server
https://fortls.fortran-lang.org/
MIT License
258 stars 41 forks source link

Support full function-like macro expansions and allow for whitespace in PP directives #350

Closed emanspeaks closed 7 months ago

emanspeaks commented 10 months ago

This is a refactor of #341 to separate out the vendor-agnostic changes. (See earlier conversation there for some context.)

Closes #297 Addresses spaces on either side of the hash in preprocessor lines.

Additionally, provides more robust handling of define directives as well as support for function-like macros inherited from C-style preprocessors.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (71d5f40) 87.51% compared to head (5cf36e3) 87.70%.

Files Patch % Lines
fortls/langserver.py 87.50% 1 Missing :warning:
fortls/parsers/internal/parser.py 97.95% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #350 +/- ## ========================================== + Coverage 87.51% 87.70% +0.19% ========================================== Files 35 35 Lines 4756 4791 +35 ========================================== + Hits 4162 4202 +40 + Misses 594 589 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gnikit commented 8 months ago

I will have another pass at the added python code once the diffs clearup a bit.

gnikit commented 7 months ago

I have taken the commits from this PR + the suggestions and merged them to https://github.com/fortran-lang/fortls/pull/368. The PR just got merged in master, so I am closing this. Thanks for the code @emanspeaks . I will be issuing a major release soon.