Open rksm opened 10 years ago
My use case is the following:
Example:
alert(foo() + bar()); function foo() {/*...*/} function bar() {/*...*/}
⬇︎
Global.foo = foo; Global.bar = bar; alert(foo() + bar()); function foo() {/*...*/} function bar() {/*...*/}
Right now I chain two rules to achieve it:
grasp.replace('squery', ':root[body]', 'Global.funcdecl$.{{func-dec.id | join "\nGlobal.funcdecl$."}}\n{{}}'); grasp.replace('equery', 'Global.funcdecl$.$funcName', 'Global.{{funcName}} = {{funcName}};');
Applying the second rule is rather expensive. Is there a way to repeat the id in the join expression of the first replacement?
My use case is the following:
Example:
⬇︎
Right now I chain two rules to achieve it:
Applying the second rule is rather expensive. Is there a way to repeat the id in the join expression of the first replacement?