Remove some cursor meta-data awareness #1589
Merged
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.
What has Changed?
Following up on #1587, I set out to remove more of the meta data awareness I added to the token cursor when addressing #1551. Much to my surprise none of that could actually be removed. The addition to handle metadata in
cursor.backWardSecp()
must be there, or we're in for a major rewrite of things.The only place where we were considering metadata outside of this was in
cursor.downList()
, and was added long ago (by @bpringe) to support metadata when the debugger uses the cursor. Since I have decided that we need to move the support of metadata navigation out of the cursor primitives (except for forward/backward sexp) I then removed this fromcursor.downList()
as well. Then prepared to fix all test cases that now would break.Surprise number two: No test cases broke, except the one testin that
cursor.downList()
could be made to skip metadata. Not even the debugger util tests that tested this. And everything seems to keep working when I try it manually. I don't quite understand why, but if I have found some potentially problematic code that can be removed without any issues, I'm happy.Can you throw some testing on this from the debugger use, @bpringe? The unit tests you wrote seem to cover the needed bases, but anyway.
Fixes #1588
My Calva PR Checklist
I have:
dev
branch. (Or have specific reasons to target some other branch.)published
. (Sorry for the nagging.)[Unreleased]
entry inCHANGELOG.md
, linking the issue(s) that the PR is addressing.[ ] Added to or updated docs in this branch, if appropriateci/circleci: build
test.npm run prettier-format
)npm run eslint
before creating your PR, or runnpm run eslint-watch
to eslint as you go).Ping @PEZ, @bpringe, @corasaurus-hex, @Cyrik