From 33ed2076e7709fea3da0d52ddd135ba1a32221ad Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 6 Apr 2014 18:46:00 +0000 Subject: [PATCH] Add a comment tag for classes not named after their source files. The syntax is: Replace "--inherits" with the new tag. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1267 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleFrame.lua | 2 +- OvaleIcone.lua | 2 +- compiler.pl | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OvaleFrame.lua b/OvaleFrame.lua index c7ac3ce..32dcbce 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -10,7 +10,7 @@ local _, Ovale = ... ---inherits Frame +-- do -- local AceGUI = LibStub("AceGUI-3.0") diff --git a/OvaleIcone.lua b/OvaleIcone.lua index 1c66742..9cb91ff 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -10,7 +10,7 @@ local _, Ovale = ... ---inherits ActionButtonTemplate +-- -- local L = Ovale.L diff --git a/compiler.pl b/compiler.pl index e6d26f4..4c6e6a6 100644 --- a/compiler.pl +++ b/compiler.pl @@ -136,9 +136,15 @@ sub ParseDirectory my %pp = {}; my %pm = {}; - if ($content =~ m/--inherits (\w+)/) + if ($content =~ m/--/) { - my $parent = $1; + $class = $1; + } + + if ($content =~ m/--/) + { + $class = $1; + my $parent = $2; for my $prop (keys %{$sp{$parent}}) { $sp{$class}{$prop} = $sp{$parent}{$prop} -- 1.7.9.5