Exafunction / codeium-parse

A command line tool for parsing code syntax
MIT License
94 stars 4 forks source link

Support for Perl #10

Closed thuris closed 1 year ago

thuris commented 1 year ago

Could you add this when you have time? The preferred tree-sitter is https://github.com/tree-sitter-perl/tree-sitter-perl

pqn commented 1 year ago

Thanks for the issue. I was wondering if you could elaborate on the differences between the one you linked and https://github.com/ganezdragon/tree-sitter-perl. The latter seems to be used by nvim-treesitter right now, and seems currently more popular, but I'm not familiar with either.

thuris commented 1 year ago

Hi Prem,

That's a fair question! In short, a prominent Perl contributor found that the ganezdragon tree-sitter parsed a lot of code incorrectly. Initially they forked that repo, but soon after they started over from scratch. The ganezdragon one was added into the neovim repo in Sept 2021, while the one I'm suggesting started development a year later. Perl devs tend not to use neovim but rather emacs (that just added tree-sitter a few months ago), vim, or VS Code, so my guess is that the nvim folks haven't had much feedback on this.

A comment about the reason for the fork from one of the contributors here https://www.reddit.com/r/perl/comments/vc6c8u/comment/icdpj9m/?utm_source=reddit&utm_medium=web2x&context=3 .

The lead contributor to the one I suggest is Paul Evans https://github.com/leonerd, the developer who implemented try/catch/finally syntax in a recent Perl release He is responsible for implementing Perl's new object system in the upcoming release as well. His Perl modules (i.e. libraries) are here https://metacpan.org/author/PEVANS?sort=[[0,1]]. He is also on the Perl Steering Council.

In essence, I'm basing my suggestion on the developer's track record. I'm happy to contact one of the contributors for more information, if you like.

Thank you, Shawn

On Mon, Mar 27, 2023 at 6:26 PM Prem Nair @.***> wrote:

Thanks for the issue. I was wondering if you could elaborate on the differences between the one you linked and https://github.com/ganezdragon/tree-sitter-perl. The latter seems to be used by nvim-treesitter https://github.com/nvim-treesitter/nvim-treesitter right now, and seems currently more popular, but I'm not familiar with either.

— Reply to this email directly, view it on GitHub https://github.com/Exafunction/codeium-parse/issues/10#issuecomment-1486076667, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUG752STOLEBCHY2I7M5KLW6I44JANCNFSM6AAAAAAWJ3PMFU . You are receiving this because you authored the thread.Message ID: @.***>

-- www.thuris.com

pqn commented 1 year ago

Thanks for the explanation. I've just added it, let me know if you have any questions.