beanshell / beanshell

Beanshell scripting language
Apache License 2.0
815 stars 183 forks source link

Fix issue #753 #754

Closed opeongo closed 4 months ago

opeongo commented 4 months ago
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b35aac4) 74.24% compared to head (ddf0a0e) 74.24%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #754 +/- ## ========================================= Coverage 74.24% 74.24% Complexity 3042 3042 ========================================= Files 108 108 Lines 9357 9357 Branches 1857 1857 ========================================= Hits 6947 6947 Misses 2070 2070 Partials 340 340 ``` | [Flag](https://app.codecov.io/gh/beanshell/beanshell/pull/754/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=beanshell) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/beanshell/beanshell/pull/754/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=beanshell) | `74.24% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=beanshell#carryforward-flags-in-the-pull-request-comment) to find out more.

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

nickl- commented 4 months ago

Looks good

opeongo commented 4 months ago

Need #732 merged before I can fix bshdoc.bsh. It also has a problem with method lookups, where the interpreter has trouble distinguishing bshdoc(String) from bshdoc(String[]).

nickl- commented 4 months ago

Need #732 merged before I can fix bshdoc.bsh. It also has a problem with method lookups, where the interpreter has trouble distinguishing bshdoc(String) from bshdoc(String[]).

Not sure how this relates to this issue, this PR is closed right?

opeongo commented 4 months ago

The first version was a minimal fix that only worked with formal comments that had two *. Other formal comment styles (three or more or formal comments within statements) would be still be ignored or would cause parsing errors.

I have another version that fixes all the problems with parsing Java comments. In this new patch BeanShell properly parse comments the same way as Java. The consequence is dropping the BSHFormalComment node and adding a few accessor methods to obtain comments.

I updated bshdoc.bsh to use the new accessors, even though it is not being used in the build at the moment. At least this should show how to use the new accessors for working with comments in the parser.

nickl- commented 1 month ago

756 has been reviewed