-
Notifications
You must be signed in to change notification settings - Fork 34
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
Wonky sexp detection #19
Comments
Here's the code I had in the buffer |
Seems I was missing a closing paren somewhere. This could arguably be handled more gracefully :) |
You've certainly found a weakness: bracket highlighting, eval, and all
other commands rely on parsed Clojure code. when the code in the panel does
not represent a valid form, the reader chokes.
This is happening in the 'mhuebert/magic-tree' library, where we dig quite
deeply into the 'reading' process rather than using the standard clojure
reader. So we have some flexibility. It would be nice to have:
1. Accurate error messages, as soon as this occurs
2. Perhaps modify our reader to be more forgiving, and still create an AST
under 'broken' conditions when possible
…On Tue, Jun 6, 2017 at 11:27 AM Arne Brasseur ***@***.***> wrote:
Seems I was missing a closing paren somewhere. This could arguably be
handled more gracefully :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKFZ-YMdEt4k9eJw15Wti9MKit2oPMTks5sBRuOgaJpZM4NxEda>
.
|
Closing this just to move the discussion to #20. Also, a bit of further explanation of the video you posted (thanks btw, that's a really clear way to show the problem!) - currently whenever we are unable to generate an AST, we re-use the AST from the last valid state of the document. This can lead to really weird effects where seemingly random characters are bolded: these are the 'ghosts of parentheses past' ;-). |
Seems the code to detect the start/end of the current sexp is still a bit wonky. See the video:
https://youtu.be/NIHWV3FH808
Also seeing a lot of these in the browser console
The text was updated successfully, but these errors were encountered: