-
-
Notifications
You must be signed in to change notification settings - Fork 48
Extending file preprocessing #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the PR @ShatrovOA I will have a look towards the end of the week. Preliminary thoughts based on a quick look, are that the diffs in the parser are substantial.That is a problem and it will likely hold back the PR. Good comments for your additions would go a long way to make things easier to review. I will have a more detailed look during the weekend. |
Codecov Report
@@ Coverage Diff @@
## master #277 +/- ##
==========================================
+ Coverage 86.91% 87.27% +0.35%
==========================================
Files 12 12
Lines 4556 4573 +17
==========================================
+ Hits 3960 3991 +31
+ Misses 596 582 -14
|
I can at least confirm that the two lines added at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please elaborate inline and in detail as to the changes in the preprocess_file
function.
The refactoring of the main parser for me is concerning.
I can't tell if there is drop of coverage in certain lines, or the base is simply out of date with the master, or there is added code (not just white space changes) and there is no 1-to-1 equivalence between the coverage of master and this PR.
Splitting changes to the parser file into multiple commits would allow for easier inspection of the changes in line by line coverage.
I will attempt to bring this PR up to date and see if there is way to add this external for-loop without causing so many diffs.
Yes, I think this PR needs to be split in 2, or at least have 2 GitHub Issues linked to it. Right now this is not a mergeable PR. |
hey @ShatrovOA I am really keen on merging the changes in this PR but we have to split them in 2 seperate PRs and have them accompanied by Issues. Let's start with Issue 1. you mentioned. Let me know if you are interested in pursuing this, otherwise I will close this PR, and attempt to updated, cherry-pick and isolate the changes and myself. |
I am closing this PR as it appears to have been abandoned. I will try and implement certain bits of it as a separate PR. Ideally with lazy evaluations. |
Hello everyone!
This request is targeting couple issues with file preprocessing:
#else
is not taken into consideration in case all above directives are not resolving. This issue is resolved in parse_fortran.py:2166#include
statement can add something new to the AST, e.g. module usage, functions, variables, etc. In such case I would like to see definitions in a hover. To resolve this issue, I addedpp_adds
return value topreprocess_file
andFortranFile.preprocess
methods. In order to resolve all additional definitions, I added a loop over new lines inFortranFile.parse
method.Some tests were also added.
@gnikit, let me know what you think
Thanks