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
Add option to ignore parens in lisp/scheme block comments #80
Merged
Conversation
This file contains 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
mnacamura
force-pushed
the
lisp-block-comment
branch
from
June 16, 2020 04:58
85b4af8
to
2eaf32d
Compare
mnacamura
force-pushed
the
lisp-block-comment
branch
2 times, most recently
from
June 16, 2020 11:52
b555ebf
to
8eb0fc7
Compare
Seems OK but test fails: test indent_mode ... FAILED failures: ---- indent_mode stdout ---- thread 'indent_mode' panicked at 'assertion failed: `(left == right)` left: `"(let [a 1] ;\n ret)"`, right: `String("(let [a 1]) ;\n ret")`: case 538: text', tests/cases.rs:34:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Fix bug in commit df92966
mnacamura
force-pushed
the
lisp-block-comment
branch
from
June 16, 2020 14:25
8eb0fc7
to
92b0ccf
Compare
Another glitch has been found. Block comment in one line works: (let ([x 1])
#|comment|#
x) But in multi lines, it fails: (let ([x 1
#|com
ment|#
x) |
Fixed. |
Thanks for this! Please add an entry to CHANGELOG.adoc and add your name to "Contributors" in README.adoc if you like. |
This happened because # was not recognized as closable by is_closable().
I pushed (hopefully) the final bug fix for this PL and updated the documents. I feel really honored to be counted as a contributor. Thanks! |
Thank you for the work! |
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.
Closes #66
(This PL is built on top of #79, so please merge #79, if it is okay, before this.)Scheme and Common Lisp support nested block comment:
This PL enables parinfer-rust to ignore parens inside the nested block comment.
For doing so, I did a bit of refactoring for function
on_char()
and now it dispatches depending not only on char but also on parser context (i.e., reading code, reading comment, reading string, reading Janet long string, etc.)It works fine for me practically but introduces a failing test case:Looks like related to JSON serialization. @eraserhd Could you kindly give me any suggestion to fix this if you have time and if interested in this PL?Fixed!