How would I create a regular expression to find and replace all the functions declarations in an class file with a copy of the function declaration and then a call to object passing the function name for debugging purposes.
For example, I'd want to replace
function showSkittles(){
with
function showSkittles(){
debugObject.traceFunction("showSkittles");
Pseudo expression code would look like this:
Find ("<>" enclose variables):
"public function" + <function name> + "}"
Replace with:
<found string> + line break + "debugObject. traceFunction(" + <function name> + ");"
For example, I'd want to replace
function showSkittles(){
with
function showSkittles(){
debugObject.traceFunction("showSkittles");
Pseudo expression code would look like this:
Find ("<>" enclose variables):
"public function" + <function name> + "}"
Replace with:
<found string> + line break + "debugObject. traceFunction(" + <function name> + ");"