CursorSoftware Engineer · OnsiteCodemia practiceImplement an AST Differ for Code Changes
Implement an Abstract Syntax Tree (AST) differ that takes two AST representations of source code as input and computes a minimal edit script to transform the first AST into the second. The output should detail the necessary operations at the node level, including additions, deletions, and modifications of functions, statements, and expressions, ensuring that the transformation is efficient and accurate.