-
Notifications
You must be signed in to change notification settings - Fork 752
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
GHC Cmm #1387
GHC Cmm #1387
Conversation
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.
Sorry it's taken so long to get to this :( I hope you haven't lost interest!
It's very cleanly defined but it does feel a little like a proper language parser rather than a syntax highlighter. Would it not be possible to have a simpler number of rules that match keywords individually rather than looking to match sets of keywords with arbitrary whitespace and comments between them?
Hey @pyrmont , Thanks a lot for taking the time for this review! I will check, if I can simplify the keyword matching rules. (I first have to remember what I actually did ... 😉 ) |
@supersven This looks good to me. Did you have anything else you wanted to add? |
@pyrmont I'm doing some final testing ... I've pushed a small change regarding |
@supersven No worries, just say when! :) |
The whitespace found by lookahead was added to the `Keyword::Constant` token, but it should be Text.
@pyrmont , I've finished testing: I think it can now be merged. 😃 Thanks a lot for your time and this review! (Please squash the commits during merge.) |
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.
Sorry for not raising this before (especially after I said this was good to go) but I just noticed this:
@supersven Thanks for all the work you put into this. The lexer will be part of the next version of Rouge, v3.18.0. That version is scheduled for release on Tuesday 14 April (so either today or tomorrow depending on where you're reading this!). |
This commit adds a lexer for GHC Cmm.
This is a lexer for C minus minus, which is a dialect of C--. It's used as intermediate and hand-written language in the Glasgow Haskell Compiler.
More details: