Open belusky opened 8 years ago
How can I reference arr,item arguments call in replacement string with s-query? grasp -s 'call[callee=member[obj=#array][prop=#indexOf]]' test.js 1:array.indexOf(arr, item);
arr,item
grasp -s 'call[callee=member[obj=#array][prop=#indexOf]]' test.js
1:array.indexOf(arr, item);
grasp -s 'call[callee=member[obj=#array][prop=#indexOf]]' -R ' ??? ' test.js
Result after replacement should be arr.indexOf(item)
arr.indexOf(item)
With e-query it should be grasp -e 'array.indexOf($arr,$item)' -R '{{arr}}.indexOf({{item}})' test.js
grasp -e 'array.indexOf($arr,$item)' -R '{{arr}}.indexOf({{item}})' test.js
How can I reference
arr,item
arguments call in replacement string with s-query?grasp -s 'call[callee=member[obj=#array][prop=#indexOf]]' test.js
1:array.indexOf(arr, item);
grasp -s 'call[callee=member[obj=#array][prop=#indexOf]]' -R ' ??? ' test.js
Result after replacement should be
arr.indexOf(item)
With e-query it should be
grasp -e 'array.indexOf($arr,$item)' -R '{{arr}}.indexOf({{item}})' test.js