ethan-leba / tree-edit

🌲 Structural editing in Emacs for any™ language!
GNU General Public License v3.0
393 stars 16 forks source link

Automated use of precedence nodes #7

Open ethan-leba opened 2 years ago

ethan-leba commented 2 years ago

Tree-edit should be smart about the precedence of nodes, for example in a C-like language: Inserting an + into x * [y] should output x * (y + z), as due to the precedence rules x * y + z would modify the AST of y to place it under a new parent, or inserting * in [x + y] should produce (x + y) * z.