ganezdragon / tree-sitter-perl

a perl parser for javascript
MIT License
33 stars 9 forks source link

Parser breaks on some heredocs #20

Closed lf- closed 1 year ago

lf- commented 2 years ago

Sample: https://invent.kde.org/sdk/kdesrc-build/-/blob/master/modules/ksb/Updater/Git.pm#L388-399

Somewhat amusingly, gitlab uses treesitter, so it is also broken.

Screenshot: image

All the lines past the end of the screen are also mishighlighted as string.

ganezdragon commented 1 year ago

tree-sitter-perl is yet to provide support for eof. Let me see if I can code it this weekend!

ganezdragon commented 1 year ago

This is gonna take few more weeks as this is a big feature.

ganezdragon commented 1 year ago

this is the feature PR - https://github.com/ganezdragon/tree-sitter-perl/pull/28

jimf5 commented 1 year ago

this is the feature PR - #28

This MR is still in progress☹

ganezdragon commented 1 year ago

@jimf5 perl heredocs are bit complicated :) But I'm working on it

jimf5 commented 1 year ago

@ganezdragon thanks for your efforts

ganezdragon commented 1 year ago

@jimf5 the PR is merged to master. Please check from your end and feel free to close this issue.

jimf5 commented 1 year ago

@ganezdragon Thank you for fixing this issue. Now heredocs look as it should be.