Skip to content

(Closes #3568) Removes references to fparser directly in the DUCs - #3574

Open
LonelyCat124 wants to merge 4 commits into
masterfrom
3568_codeblock_detail
Open

(Closes #3568) Removes references to fparser directly in the DUCs#3574
LonelyCat124 wants to merge 4 commits into
masterfrom
3568_codeblock_detail

Conversation

@LonelyCat124

Copy link
Copy Markdown
Collaborator

I decided this was a small change and better to do now, and the TreeSitter changes can come later.

The only things I'm unsure about are why the base CodeBlock class isn't abstract now, and whether its correct to do -> bool on an abstractmethod with no code? It conceptually seems correct but I'm not sure about the reality.

Assuming coverage is correct this is ready for a review from @arporter @sergisiso

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b863aea) to head (d9bf64c).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3574   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          399       399           
  Lines        56181     56227   +46     
=========================================
+ Hits         56181     56227   +46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mn416

mn416 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

A related method to add here would be contains_stop_stmt() (which checks for Fortran2003.Stop_Stmt or Fortran2008.Error_Stop_Stmt).

It also might be useful to have a method is_singleton(), which tells whether the CodeBlock contains a single parse node. That way, cb.is_singleton() and cb.contains_exit() tells you not only that the CodeBlock contains an exit statement but that it is an exit statement.

@LonelyCat124

Copy link
Copy Markdown
Collaborator Author

I'll add those as well.

@LonelyCat124

Copy link
Copy Markdown
Collaborator Author

Added @mn416 's suggestions (I think), so ready for review again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants