Skip to content

Commit

Permalink
added macros to source
Browse files Browse the repository at this point in the history
  • Loading branch information
noptic committed Jan 22, 2013
1 parent 889814f commit 8a4b6c9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/daliaIT/rough/FileSearcher.php
@@ -1,13 +1,7 @@
<?php
namespace daliaIT\rough;
class FileSearcher
{
protected
#>bool
$isInFilter = true,
$isOutFilter = false;
#<

{
public function search($data){
$results = glob($data);
if(!$results) return array();
Expand Down
2 changes: 2 additions & 0 deletions src/daliaIT/rough/MacroLib.php
Expand Up @@ -21,4 +21,6 @@ public function setMacro($name, $macro){
$this->macros[$name] = $macro;
return $this;
}

#@access public public macros array@#
}
6 changes: 5 additions & 1 deletion src/daliaIT/rough/MacroParser.php
Expand Up @@ -5,17 +5,22 @@
class MacroParser
{
protected
#:IMacroLib
$macroLib,
#:string
$pattern = '/^([ \t]*)#@(.*?)(?:@#|#(.*?)#@#)/sm',
#:array
$options = array(
'indentOutput' => true,
'stripMacros' => false,
);

#:this
public function __construct(IMacroLib $lib){
$this->macroLib = $lib;
}

#_string
public function replace($input,array $options=array()){
$lib =$this->macroLib;
$argParser = new MacroArgParser();
Expand Down Expand Up @@ -83,5 +88,4 @@ public function setPattern($value){
return $this;
}
#@#

}
3 changes: 3 additions & 0 deletions src/daliaIT/rough/command/Build.php
Expand Up @@ -15,6 +15,7 @@
class Build
{
protected
#:MacroParser
$parser;

public function __construct(){
Expand Down Expand Up @@ -117,4 +118,6 @@ protected function getTargetFiles($base, $buildInfo){
}
return $files;
}

#@access public parser MacroParser@#
}

0 comments on commit 8a4b6c9

Please sign in to comment.