- Added a loop index in AbstractLoop control struct.
This commit is contained in:
1 parent
e737e82d7e
commit
ef95576d74
10 files changed
+73
-36
No files matched your search
@@ -4,7 +4,7 @@ namespace Picea\ControlStructure;
|
||||
|
||||
class IfToken implements ControlStructure {
|
||||
|
||||
public array $token = [ "if", "else", "elseif", "endif" ];
|
||||
public array $token = [ "if", "else", "elseif", "endif", "/if" ];
|
||||
|
||||
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token, array $options = []) : string {
|
||||
switch($token) {
|
||||
@@ -16,7 +16,8 @@ class IfToken implements ControlStructure {
|
||||
|
||||
case "elseif":
|
||||
return "<?php elseif ($arguments): ?>";
|
||||
|
||||
|
||||
case "/if":
|
||||
case "endif":
|
||||
return "<?php endif ?>";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user