klauer / blark

Beckhoff TwinCAT ST (IEC 61131-3) code parsing in Python using Lark (Earley)
https://klauer.github.io/blark/
GNU General Public License v2.0
42 stars 5 forks source link

ENH: first pass at JMP and labeled statements #79

Closed klauer closed 1 year ago

klauer commented 1 year ago

Closes #78

This should be good enough for a first pass.

Should probably add more test cases for this but I think the ones listed here check the edge cases.

codecov-commenter commented 1 year ago

Codecov Report

Merging #79 (6fae121) into master (bc5a458) will increase coverage by 0.2%. The diff coverage is 100.0%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/klauer/blark/pull/79/graphs/tree.svg?width=650&height=150&src=pr&token=QZDTKF30TH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer)](https://app.codecov.io/gh/klauer/blark/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer) ```diff @@ Coverage Diff @@ ## master #79 +/- ## ======================================== + Coverage 79.5% 79.8% +0.2% ======================================== Files 26 26 Lines 5467 5491 +24 ======================================== + Hits 4350 4383 +33 + Misses 1117 1108 -9 ``` | [Files Changed](https://app.codecov.io/gh/klauer/blark/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer) | Coverage Δ | | |---|---|---| | [blark/tests/test\_transformer.py](https://app.codecov.io/gh/klauer/blark/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer#diff-YmxhcmsvdGVzdHMvdGVzdF90cmFuc2Zvcm1lci5weQ==) | `93.5% <100.0%> (+0.1%)` | :arrow_up: | | [blark/transform.py](https://app.codecov.io/gh/klauer/blark/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer#diff-YmxhcmsvdHJhbnNmb3JtLnB5) | `98.9% <100.0%> (+<0.1%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/klauer/blark/pull/79/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K+Lauer)
klauer commented 1 year ago

You made it easy reporting exactly what needed to be added 👍 Thanks for the review