Hi, im trying to get function list working for a script language im working in.
The problem is that functions are not declared with "function" or "proc" or anything, so i cant differantiate them from for() if() and while() statements:
Im now using:
/Function String = "%[ ^t]++^([a-zA-Z_]+^)([a-zA-Z0-9_, ]++)[ ^t]++{"
But IF, FOR and WHILE loops are also added with this. Is there someway I can get it to ignore those words?
The problem is that functions are not declared with "function" or "proc" or anything, so i cant differantiate them from for() if() and while() statements:
Code: Select all
get_hash_id() {
if ( Global.go ) {
return Network.blablabla;
} else {
return void;
}
}
kill( reason, listx ) {
for ( unit in listx ) {
unit.hp := 0;
}
}
/Function String = "%[ ^t]++^([a-zA-Z_]+^)([a-zA-Z0-9_, ]++)[ ^t]++{"
But IF, FOR and WHILE loops are also added with this. Is there someway I can get it to ignore those words?