Cannot add a new node before current statement #7791
-
|
Having this line of code I am actually moving out the internal func call to obtain this Actualy rule code, after initial tests, is doing this But I got this error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hi, if you want to replace 1 node with 2, just return array of 2 stmts: return [$firstStmt, $secondStmt];That will update the node tree with these 2 new nodes. |
Beta Was this translation helpful? Give feedback.
-
|
Resolved ! i was wrong creating the FuncCall argument. i passed a Variable instead of an Arg So I fixed into Now I can add the new assignment before current node (where current node is already changed !) |
Beta Was this translation helpful? Give feedback.
Resolved !
i was wrong creating the FuncCall argument.
i passed a Variable instead of an Arg
So I fixed
into
Now I can add the new assignment before current node (where current node is already changed !)