Are there any (ideally GUI) diff tools that are aware of syntax?
As an example of the kind of thing I'm looking for, I keep finding that my current tool miss aligns repetitive code:
Foo = { 'hello': 'world', | Foo = { 'hello': 'world',
'goodnight': 'moon' | 'goodnight': 'moon'
} <
<
Bar = { 'picture': 1000, <
} | }
I'd like a tool that would try and make matching braces on one side align with matching braces on the other.
Edit: I'm looking for a tool that can automatically spot that condition and correct it's alignment.
Not GUI based, but completely syntax driven: my company's Smart Differencer tools for many langauges (incluiding Java, C#, C++, PHP, Python, JavaScript, HTML, XML, COBOL,...)
The Smart Differencer parses the source text like the compiler, so it understands that language syntax and structures the way the compiler does. It compares these structures (using ASTs) to determine the "least edit distance" in terms of edit actions (move, copy, delete, replace, rename-identifier-in-block) on these structures and report them.
In your example, it would know the curly brace on the right belongs to foo, not bar, and would tell you that the entire statement involving bar was simply deleted.
The output style is diff-like if you want to feed the result to another tool, or more human readable if you want to examine it directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With