Teach compiler.pl that public static methods are also valid properties.
Johnny C. Lam [04-06-14 - 18:45]
Teach compiler.pl that public static methods are also valid properties.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1261 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/compiler.pl b/compiler.pl
index 1256c18..e6d26f4 100644
--- a/compiler.pl
+++ b/compiler.pl
@@ -109,11 +109,6 @@ $sp{Ovale}{OvaleQueue} = true;
$sp{Ovale}{OvaleSkada} = true;
$sp{Ovale}{OvaleTimeSpan} = true;
-$sp{OvaleCondition}{Compare} = true;
-$sp{OvaleCondition}{ParseCondition} = true;
-$sp{OvaleCondition}{ParseRuneCondition} = true;
-$sp{OvaleCondition}{TestValue} = true;
-
$m{OvaleQueue}{NewQueue} = true;
$sp{OvaleQueue}{Front} = true;
$sp{OvaleQueue}{FrontToBackIterator} = true;
@@ -122,15 +117,6 @@ $sp{OvaleQueue}{InsertFront} = true;
$sp{OvaleQueue}{NewDeque} = true;
$sp{OvaleQueue}{RemoveFront} = true;
-$sp{OvaleTimeSpan}{Complement} = true;
-$sp{OvaleTimeSpan}{CopyTo} = true;
-$sp{OvaleTimeSpan}{HasTime} = true;
-$sp{OvaleTimeSpan}{Intersect} = true;
-$sp{OvaleTimeSpan}{IntersectInterval} = true;
-$sp{OvaleTimeSpan}{Measure} = true;
-$sp{OvaleTimeSpan}{NextTime} = true;
-$sp{OvaleTimeSpan}{Union} = true;
-
sub ParseDirectory
{
my $dh = shift;
@@ -236,10 +222,12 @@ sub ParseDirectory
if ($content =~ m/<public-static-methods>(.*)<\/public-static-methods>/s)
{
my $sm = $1;
- while ($sm =~ m/function\s+$class:(\w+)\s*\(/g)
+ while ($sm =~ m/function\s+${class}[.:](\w+)\s*\(/g)
{
$sm{$class}{$1} = true;
- delete $m{$class}{$1}
+ delete $m{$class}{$1};
+ # All public static methods are also public static properties.
+ $sp{$class}{$1} = true;
}
}