-
Notifications
You must be signed in to change notification settings - Fork 740
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
Fix use of # character in Racket lexer #1472
Conversation
How's this look @yugenekr? |
Hi @pyrmont, thank you for working on this. The updates you provided look mostly fine to me (I'm not Ruby or Rouge person) in regard the particular use cases I provided. If to dive into a bit more details, more use cases might need to be covered. I believe Racket parser documentation provides the list of all Also, see several comments examples from this documentation page This section might add some context to the Racket comments usage: Do you think it could be worthwhile working on the rest of the cases? Or keep it till the exact need arises? |
@yugenekr I think having support for commenting out s-expressions would be cool (and I don't think too difficult). Will have to add another state but should be straightforward. I'll have a tinker. |
@yugenekr Famous last words, I guess. I realised looking at the list of datums in Racket that it could actually get quite complicated. I've tried a relatively simple approach that I think will cover most cases. How does it look to you? |
I agree these changes should be sufficient for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor notice. I'm not aware of exact usages of these samples. And from my perspective it might be more descriptive to use doc comments such as: ;; Highlight booleans
, (...) should be highlighted as the commented text
or similar.
@yugenekr Thanks for your help on this one. The update version will go out as part of the next release of Rouge. That's scheduled for Tuesday 14 April 🎉 |
Great! Thanks a lot reacting fast with the updates. |
The # character can be used in Racket in multiline comments as well as in boolean constants. Currently, the Racket lexer does not at correctly lex multiline comments, expression comments or full-word boolean constants. This commit adds support for those constructs. It also removes extraneous code from the visual sample.
The
#
character can be used in Racket in multiline comments as well as in boolean constants. As described in #1471, the Racket lexer does not at present correctly lex multiline comments or full-word (i.e.#true
as opposed to#t
) boolean constants.This PR fixes those bugs (and will close #1471). It also removes extraneous code from the visual sample.