Skip to content

(towards #3083) Scaffolding for Treesitter frontend#3351

Open
sergisiso wants to merge 30 commits intomasterfrom
treesitter
Open

(towards #3083) Scaffolding for Treesitter frontend#3351
sergisiso wants to merge 30 commits intomasterfrom
treesitter

Conversation

@sergisiso
Copy link
Collaborator

@sergisiso sergisiso commented Feb 25, 2026

This PR provides a barebones treesitter frontend that allows to do: psyclone --frontend treesitter test.f90 to essentially generate a treesitter codeblock encompassing the whole file. This needed a few changes because the CodeBlock and Reader only had one concrete class each and fparser was leaking in many places.

This PR:

  • Creates a treesitter reader
  • Encapsulates parser generation functionality inside the respective reader files (fparser and treesitter)
  • Subclass CodeBlock for fparser and treesitter

The performance of treesitter won't be ideal until all leaks of fparser are container (e.g. it is only lazy loaded from inside its reader and codeblock), because a large part of the fparser performance hit is at import time.

Hopefully follow on PRs can be more contained inside the reader class.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (c54c5f1) to head (983b205).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3351    +/-   ##
========================================
  Coverage   99.95%   99.95%            
========================================
  Files         387      388     +1     
  Lines       54315    54432   +117     
========================================
+ Hits        54293    54410   +117     
  Misses         22       22            

☔ View full report in Codecov by Sentry.
📢 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant