Wilfred / difftastic

a structural diff that understands syntax 🟥🟩
https://difftastic.wilfred.me.uk/
MIT License
19.94k stars 317 forks source link

[Question] Want to know the changes in the AST nodes of the old and new files? #720

Closed yikengboy closed 1 month ago

yikengboy commented 1 month ago

public void foo() { System.out.println("foobar"); } public void foo() { }

Just like the example above, foo method should be a node of AST, I want to know which node of AST these code changes belong to. And I am a beginner in Rust. Can you provide some source code for reference?

Wilfred commented 1 month ago

You can play with --dump-syntax and --dump-ts to see the AST. I'm afraid difftastic isn't a great project for Rust beginners, but I'm sure you'll find some interesting projects elsewhere :)