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.
Tree-edit should be smart about the precedence of nodes, for example in a C-like language: Inserting an
+
intox * [y]
should outputx * (y + z)
, as due to the precedence rulesx * y + z
would modify the AST ofy
to place it under a new parent, or inserting*
in[x + y]
should produce(x + y) * z
.