Repository navigation
Match structural brackets in native Scheme and Common Lisp - #8
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Parser-only refresh lacks coverage — Added a Native/Melange editor case that publishes a previously out-of-viewport structural closer and checks that both marks refresh while the selection remains identical.
- Unbounded token emission on long lines — Long Lisp lines now yield between token batches and preserve lexer state when resumed. A regression checks that a continued string still excludes its literal closing parenthesis.
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.
Summary
Emit one UTF-16 code unit per structural bracket in the native Scheme and Common Lisp stream parsers. Delimiter nodes carry matching metadata and retain their syntax style across token merging. The shared matcher uses the marked nodes and updates when the parser publishes a new tree. Long Lisp lines yield between token batches while retaining lexer state.
This addresses the examples from #7. Scheme
'(")")matches offsets 1 and 5, and Common Lisp(\))matches 0 and 3. Custom readtables and additional dialect-specific syntax remain outside the stream modes' coverage.Validation
dune build @all,dune runtest, anddune build @melange-testspassed. Native and Melange cover bracket repaint with the caret stationary after parser completion.8374b2ab8elinked CodeMirror MLc4ff288and temporarily enabled matching for both native modes. The shipping Logseq dependency pin and allowlist are handled separately.Link to Devin session: https://app.devin.ai/sessions/97b992ac6a93453796bebbf311e43f75
Open in Devin Desktop: https://app.devin.ai/desktop/session/97b992ac6a93453796bebbf311e43f75?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed all 2 findings · Follow Devin's work