Detect private functions defined using variable assignment.
Johnny C. Lam [07-13-14 - 11:30]
Detect private functions defined using variable assignment.
This detects functions defined as follows:
local foo
foo = function() ... end
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1531 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/compiler.pl b/compiler.pl
index 8d1e3e4..dda53bc 100644
--- a/compiler.pl
+++ b/compiler.pl
@@ -227,6 +227,10 @@ sub ParseDirectory
{
$psm{$1} = true;
}
+ while ($psm =~ m/(\w+)\s*=\s*function\s*\(/g)
+ {
+ $psm{$1} = true;
+ }
}
if ($content =~ m/<public-static-properties>(.*)<\/public-static-properties>/s)