Insert statements from a weaving rule to a given position in a list
Hey,
I need a weaving rule to insert some statements in a statement list. But this new statements must be inserted previous to the current node. If I just take the block statement as context node the new statement is appended at the end.
I need this because I want to replace some expressions by own declared elements (for example variables). So I must insert the new statement before my current one therefore I can reference it.
I need a weaving rule to insert some statements in a statement list. But this new statements must be inserted previous to the current node. If I just take the block statement as context node the new statement is appended at the end.
I need this because I want to replace some expressions by own declared elements (for example variables). So I must insert the new statement before my current one therefore I can reference it.
Please sign in to leave a comment.
The following example
is generated into