Diff tools usually works on a line basis. That works pretty well except if 2 peoples add a new methods at the end of a file that results in a conflict , even using a 3-way diff, because system think both people tried to add something different as the place , except in that case the exact location doesn't really matter.
So I was wondering if it would be possible to do a more intelligent diff, using eventually the abstract syntax tree (AST) of the language so the diff would "understand" that you added or moved a new method or variable (rather than just messing around with block of lines).
I understand that a such diff would be language specific, but as many languages shared the same structure I might not be to hard to do something usable for different languages.
The thing is if it's not a stupid idea, somebody should have done it already, so the question is a such tool already exists and if not why ?
(if it's not stupid , new and usefull , I might be interested in launching a such project)
update
I'm looking for a free one (and if possible Ruby)