(Closes #3446) Update to fix issues with codeblocks and routine names when comments exist.#3456
(Closes #3446) Update to fix issues with codeblocks and routine names when comments exist.#3456LonelyCat124 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3456 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 395 395
Lines 55199 55200 +1
=========================================
+ Hits 55199 55200 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@sergisiso @arporter This is ready for a first look. |
arporter
left a comment
There was a problem hiding this comment.
Thanks @LonelyCat124. I think we just need to allow for Functions too and then this is probably good to go (I'll do the ITs next time around).
| # Have to walk to find the subroutine_stmt as | ||
| # comments can appear before the subroutine stmt. | ||
| subroutine_stmt = walk(routine, | ||
| Fortran2003.Subroutine_Stmt) |
There was a problem hiding this comment.
I see routines can contain subroutines or functions. Does this walk also need to be extended to allow for functions?
There was a problem hiding this comment.
Ah yeah, my mistake, will fix.
|
|
||
| contains | ||
|
|
||
| ! This routine will be a codeblock. |
There was a problem hiding this comment.
Please could you extend this test/add a new one that also checks when we have a Function.
There was a problem hiding this comment.
Repeated the test with a function.
|
@arporter Ready for another look. |
I tested this with the original file @schreiberx gave me also and it works now.
The change is just to use walk(...) instead of relying on the fparser structure.