-
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
Implement an Obj-C lexer #27
Comments
Pygments is interesting in that it calls |
Oh, interesting. Right, because it's built on top of C, and they have to support C and C++. In Rouge, I'd think it'd be easier just to |
So objc delegates to c and objc++ delegates to c++. But the extra Objective-C functionality is like a mixin into objc & objc++. I have guest posts on my luanova.org blog that use Objective-C, so I'm hoping to see this one. |
Released in 0.5.2 |
CLI 0.7.0 updates
Hi, apologies for commenting on a long-closed issue but I was wondering if Rouge ever got Objective-C++ support. If it did, how can I turn it on? If not, is there I anything I can do to help get this added (should I file a lexer request?) I want to put some snippets in Objective-C++ on my blog and would like that to be highlighted too :) |
@saagarjha Rouge has an Objective-C lexer, it was added in version 0.5.2 so will in all likelihood be in the version you're using. With GitHub-style code blocks that look like Hope that helps! |
Right, that's what I'm using now. But that one doesn't "get" C++ like an actual Objective-C++ lexer would, so it leaves large blocks of my code unhighlighted. |
Oh sorry—I didn't catch that it was Objective-C++. I'm afraid no, we don't have a lexer for that. You can look at how the Objective-C lexer is implemented if you'd like to try making an Objective-C++ lexer. |
So I took a look and it looks like there's some sort of " |
It's possible - it has a lot of room for bugs though. See sass/scss, which both extend from css, for an example. |
I'm actually astounded that such a language exists, and that somebody took the time to write a parser for it to be honest. |
Hey, once you have one C++ parser, you try to get as much milage out of it as you can ;) I'll take a look at factoring out the Objective-C parts and see how it works out. |
Another example worth looking at is TSX, a combination of typescript and JSX, which are both extensions of javascript. |
Hmm, so I'm having some difficulty with subclassing, and I unfortunately don't know Ruby well enough to figure it out. AFAIK Ruby doesn't do multiple inheritance, so what I'm trying to do is have |
Yes, since there is no multiple inheritance, you will need to move existing code around in order to implement this. Look into how |
@saagarjha I suggest you move this into a new issue or (better yet) a PR; this isn't really related to the original issue. |
Thanks for the help; I filed #1378 with a rough attempt at getting this to work. |
No description provided.
The text was updated successfully, but these errors were encountered: