stfc / fparser

This project maintains and develops a Fortran parser called fparser2 written purely in Python which supports Fortran 2003 and some Fortran 2008. A legacy parser fparser1 is also available but is not supported. The parsers were originally part of the f2py project by Pearu Peterson.
https://fparser.readthedocs.io
Other
63 stars 29 forks source link

Fix namelist r552 matching error (closes #165) #415

Closed rupertford closed 1 year ago

rupertford commented 1 year ago

The implementation of namelist-stmt r552 in Fortran2003 (Namelist_Stmt) contained asserts in two places rather than returning None (which specifies no match). This PR fixes this error, tidies the code, tightens the implementation and adds tests that fully cover the code in the class.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fbcc2c6) 91.75% compared to head (a0d8253) 91.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #415 +/- ## ======================================= Coverage 91.75% 91.76% ======================================= Files 37 37 Lines 13384 13387 +3 ======================================= + Hits 12281 12284 +3 Misses 1103 1103 ``` | [Impacted Files](https://app.codecov.io/gh/stfc/fparser/pull/415?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stfc) | Coverage Δ | | |---|---|---| | [src/fparser/two/Fortran2003.py](https://app.codecov.io/gh/stfc/fparser/pull/415?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stfc#diff-c3JjL2ZwYXJzZXIvdHdvL0ZvcnRyYW4yMDAzLnB5) | `94.41% <100.00%> (+<0.01%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

rupertford commented 1 year ago

Ready for first review from @arporter or @sergisiso