Skip to content
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

Objective-C Scanner #46

Open
nathany opened this issue Oct 27, 2012 · 14 comments
Open

Objective-C Scanner #46

nathany opened this issue Oct 27, 2012 · 14 comments
Assignees
Milestone

Comments

@nathany
Copy link
Contributor

nathany commented Oct 27, 2012

From: http://odd-eyed-code.org/issues/32

Tony Arnold asked for an Objective-C Scanner.

"Objective-C support would be great in CodeRay (and therefore Redmine). I haven't really looked at how CodeRay works (I'm not a Ruby developer), but is it possible to provide highlighting for Cocoa classes in addition to language syntax and keywords? See http://coderay.rubychan.de/rays/show/6332 for an example of "Cocoa heavy" Objective-C." @danthorpe

"Sure! A list of all the built-in names would be great. Objective-C is becoming more popular, and I'm a little familiar with it. You can speed up the work by collecting more (public domain or LGPL) example code." - @korny

@korny
Copy link
Member

korny commented Jun 23, 2013

Since I didn't start this one yet, let's push it to 1.2.

@josefsalyer
Copy link

Hi! I need this. What do you need to get rolling?

@korny
Copy link
Member

korny commented Jul 26, 2013

More free time ;-)

And example code, lots of crazy syntax examples.

@nathany
Copy link
Contributor Author

nathany commented Jul 26, 2013

I have a few Objective-C books I may be able to pull examples from.

@josefsalyer
Copy link

I have more than few projects to pull code from.

Josef Salyer
@josefsalyer
480.286.5875

On Jul 26, 2013, at 12:16 PM, Nathan Youngman notifications@github.com wrote:

I have a few Objective-C books I may be able to pull examples from.


Reply to this email directly or view it on GitHub.

@nathany
Copy link
Contributor Author

nathany commented Jul 26, 2013

Cool. Checkout the https://github.com/rubychan/coderay-scanner-tests repo.

@josefsalyer
Copy link

I forked it and checked it out. Is there a particular git workflow that I
should use? Also, where is a good place to drop sample .h/.m files?

On Fri, Jul 26, 2013 at 5:31 PM, Nathan Youngman
notifications@github.comwrote:

Cool. Checkout the https://github.com/rubychan/coderay-scanner-tests repo.


Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-21649480
.

@nathany
Copy link
Contributor Author

nathany commented Jul 26, 2013

You'll need to create an objective-c folder with some .in.m files, just take a peek at how the other languages do it. I'm pretty sure there is a rake test to do some setup for you, but I don't remember off-hand. Feature branch + pull request would be grande.

@nathany nathany closed this as completed Jul 26, 2013
@nathany nathany reopened this Jul 26, 2013
@korny
Copy link
Member

korny commented Jul 27, 2013

The easiest way should be to check out the CodeRay repo and just run rake test:scanners. It checks out coderay-scanner-tests automatically then into a subfolder.

@tompave
Copy link

tompave commented Dec 22, 2013

I'd like to start working on this one.
Are the guidelines still valid?
Is there any previous work I should be aware of?

@korny
Copy link
Member

korny commented Dec 23, 2013

Are the guidelines still valid?

Yes.

Is there any previous work I should be aware of?

Only what's in this PR, afaik.

@tompave
Copy link

tompave commented Dec 23, 2013

Ok, thanks.
I think I'll base my work on the C scanner, as Objective-C is a strict superset of C.

@korny
Copy link
Member

korny commented Dec 23, 2013

Good idea. I guess for some things you need nested states or multiple state variables. Other scanners should give you lots of examples how to approach this, but I found using a new method optimized for each language to be the best way.

@tompave
Copy link

tompave commented Dec 24, 2013

Ok, thanks. I'll definitely ask here when I reach that stage.
80% of the work should be about recognizing the object oriented layer, that thankfully has a very precise syntax borrowed from Smalltalk.
I'll also need to consider all tokens starting with 2 capital letters as Class names, as that is the Objective-C convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants