|
@@ 1505-1507 (lines=3) @@
|
| 1502 |
|
return $this->parse($in, $from + 1, $to, false, 'root', $pointer); |
| 1503 |
|
} elseif ($curBlock === 'root' && preg_match('#^/([a-z_][a-z0-9_]*)?#i', $substr, $match)) { |
| 1504 |
|
// close block |
| 1505 |
|
if (!empty($match[1]) && $match[1] == 'else') { |
| 1506 |
|
throw new CompilationException($this, 'Else blocks must not be closed explicitly, they are automatically closed when their parent block is closed'); |
| 1507 |
|
} |
| 1508 |
|
if (!empty($match[1]) && $match[1] == 'elseif') { |
| 1509 |
|
throw new CompilationException($this, 'Elseif blocks must not be closed explicitly, they are automatically closed when their parent block is closed or a new else/elseif block is declared after them'); |
| 1510 |
|
} |
|
@@ 1508-1510 (lines=3) @@
|
| 1505 |
|
if (!empty($match[1]) && $match[1] == 'else') { |
| 1506 |
|
throw new CompilationException($this, 'Else blocks must not be closed explicitly, they are automatically closed when their parent block is closed'); |
| 1507 |
|
} |
| 1508 |
|
if (!empty($match[1]) && $match[1] == 'elseif') { |
| 1509 |
|
throw new CompilationException($this, 'Elseif blocks must not be closed explicitly, they are automatically closed when their parent block is closed or a new else/elseif block is declared after them'); |
| 1510 |
|
} |
| 1511 |
|
if ($pointer !== null) { |
| 1512 |
|
$pointer += strlen($match[0]); |
| 1513 |
|
} |