perl: flesh out textobjects queries#891
Open
rabbiveesh wants to merge 2 commits into
Open
Conversation
Expands the perl textobjects from comment/regex only to the full standard set: function, class (package/class/role), parameter (signature params + call args), conditional (if/elsif/else), loop (while/until, foreach, C-style for), call, assignment (+lhs/rhs), attribute, block, and return. Keeps the existing regex and comment captures. All captures validated against the current tree-sitter-perl grammar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expands
queries/perl/textobjects.scmfrom just comment/regex to the full standard textobject set:function— named subs, methods, anonymous subsclass—package/class/role(block form)parameter— signature params and call argumentsconditional—if/elsif/elseloop—while/until,foreach, C-styleforcall,assignment(incl.lhs/rhs),attribute,block,returnKeeps the existing
regexandcommentcaptures.All captures validated against the current
tree-sitter-perlgrammar. I was not able to runmake query/make docslocally, so please re-run the formatter / doc generation if styling needs normalizing.