projects
/
Pman.Builder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e04e7b
)
Palette.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 10 Feb 2011 09:21:49 +0000
(17:21 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 10 Feb 2011 09:21:49 +0000
(17:21 +0800)
Palette.php
patch
|
blob
|
history
diff --git
a/Palette.php
b/Palette.php
index
804c562
..
578e3d2
100644
(file)
--- a/
Palette.php
+++ b/
Palette.php
@@
-13,6
+13,9
@@
class Pman_Builder_Palette extends Pman
{
// use file..
$lines = file(dirname(__FILE__).'/RooUsage.txt');
+ $s = -1;
+ $res = array()
+ $left = array();
foreach($lines as $l) {
$l = preg_replace('#//.*#', '', $l);
@@
-20,9
+23,16
@@
class Pman_Builder_Palette extends Pman
if (!strlen(trim($l))){
continue;
}
- if (preg_match('/:$/', $l)) {
- $left = $l;
+ if (preg_match('/left:$/', $l)) {
+ $s = 0;
+ $left = array()
}
+ if (preg_match('/right:$/', $l)) {
+ $s = 1;
+ continue;
+ }
+ switch($s)
+
}
}