-
-
Notifications
You must be signed in to change notification settings - Fork 84
Update scope type modifier to expand on both ends #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't think this will work for "round", even if we decide to make it consistent with "funk". The problem is if the user has update: the algorithm described in #629 (comment) should handle this case just fine, because it will first try the start of the target, which is in the center of all the parens, and the returned domain will be |
Yes some special handling of matching pairs is fine. Just getting all the containing scope and selection types working as one would be nice. |
- Partially addresses #616 - Partially addresses #436 - Depends on #1396 ## Todo - [x] **[DISCUSS]** What to do about fallback `iterationScope`? That's the only thing that is a regression here. - [x] File issues for FIXMEs - [x] File issue for defining iteration scopes. Can probably reuse most of the code from the regular scope handler other than creating the target - [x] File issue to add unit tests for scope handlers - [x] File issue to add some Python scope types where multiple can end at the same point (due to lack of closing brackets) - [x] Add test that checks no scope types are duplicated between legacy and new definition, or file issue to add test - [x] File PR for my 7783da6 (Add support for domain, leading, trailing, interior) #1427 - [x] Look through comments on this thread for anything worth filing / doing - [x] Open as new PR? - [x] Remove extraneous test cases - [x] Double check #629 (comment); a lot of those tests we already have for the generic modifier code - [x] Make sure changes to parse-tree-extension are shipped - [x] Close #785 if we fix that - [x] Comment on #484 saying the process has started and providing link to example - [x] Close #797 if we fix that --------- Co-authored-by: Pokey Rule <[email protected]>
Right now you can take lines paragraphs and soon non whitespace sequences that expands from both anchor and active of the selection. Currently containing scopes only use start off the selection.
I want both of these to have the same result. (air and bat are in different functions)
take funk air past bat
take air past bat take funk
I was thinking that we could implement this first thing in the selection/scope modifier by basically calling the specific implementation twice, once for both ends. To day we pass the entire selection to the specific modifier(line, funk, ...). What if we pass in a single position instead?
that
mark starting in one statement and ending in another (see Re-evaluate decision to make non-empty selections non-weak #883)that
mark starting in one function and ending in another (see Re-evaluate decision to make non-empty selections non-weak #883)"item"
#901edit (@pokey)
Let's implement this one in a new
ContainingScope
stage that all containing scopes share. The algorithm should be as described in #629 (comment). The initial implementation will be folded into #629The text was updated successfully, but these errors were encountered: