jkennedy1980 / Objective-C-CPD-Language

A CPD language definition for use with Objective-C source code
http://deadmeta4.com/2011/05/17/objective-c-copy-paste-detection-using-jenkins/
MIT License
48 stars 60 forks source link

Support for ObjC Literals? #7

Open e28eta opened 12 years ago

e28eta commented 12 years ago

Are you planning to add support for Objective-C Literals?

the-jack-cox commented 11 years ago

I'll upvote this as well. I looked at the parser and spent a little time trying to figure out how to add it, but my compilers class was 30 years ago and I've forgotten most of it.

the-jack-cox commented 11 years ago

I'll just follow up and say that I'll be glad to help validate it.

SuperBarracuda commented 10 years ago

I am also having issue issues with @[ modern objective C syntax, unfortunately this makes it completely useless for me.

Please can you fix it.

jonreid commented 9 years ago

Wondered why duplicates weren't being flagged. With logging enabled, I discovered that the parser is choking on Obj-C literals. This is a big setback for an otherwise wonderful tool!

e28eta commented 9 years ago

It looks like PR #10 might fix this issue, I haven't had a chance to try it yet.

e28eta commented 9 years ago

I was looking into this a little further. Looks like built-in Obj-C support was just released in PMD 5.3. http://pmd.sourceforge.net/pmd-5.3.0/overview/changelog.html

I'm not positive it's successfully parsing all the files in my project yet, but it seems to have handled literal support by recognizing a bare '@' sign as an independent token. A very practical solution for the requirements of CPD.