php/hamle/Text/Func.php 1 location
|
@@ 53-54 (lines=2) @@
|
| 50 |
|
*/ |
| 51 |
|
public function __construct($s) { |
| 52 |
|
$m = array(); |
| 53 |
|
if (!preg_match('/^\$\((' . self::REGEX_FUNCSEL . '*)(.*)\)$/', $s, $m)) |
| 54 |
|
throw new ParseError("Unable to read \$ func in '$s'"); |
| 55 |
|
if (trim($m[2])) |
| 56 |
|
$this->sub = new FuncSub($m[2]); |
| 57 |
|
if (!trim($m[1])) { |
php/hamle/Text/FuncSub.php 1 location
|
@@ 42-43 (lines=2) @@
|
| 39 |
|
*/ |
| 40 |
|
public function __construct($s) { |
| 41 |
|
$m = array(); |
| 42 |
|
if (!preg_match('/^ +([><]) +('.self::REGEX_FUNCSEL . '+)(.*)$/', $s, $m)) |
| 43 |
|
throw new ParseError("Unable to read \$ sub func in '$s'"); |
| 44 |
|
if ($m[1] == "<") $this->dir = Hamle\Hamle::REL_PARENT; |
| 45 |
|
elseif ($m[1] == ">") $this->dir = Hamle\Hamle::REL_CHILD; |
| 46 |
|
else $this->dir = Hamle\Hamle::REL_ANY; |