- Added the missing continue token
This commit is contained in:
parent
7588748ebd
commit
67040db155
|
@ -8,7 +8,7 @@ class BlockToken implements ControlStructure {
|
|||
|
||||
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
|
||||
static $slotDefinitions = [];
|
||||
|
||||
|
||||
switch($token) {
|
||||
case "block":
|
||||
$slotDefinitions[] = $this->slotDefinitions();
|
||||
|
@ -20,7 +20,7 @@ class BlockToken implements ControlStructure {
|
|||
|
||||
case "arguments":
|
||||
$class = static::class;
|
||||
|
||||
|
||||
return <<<PHP
|
||||
<?php
|
||||
try {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Picea\ControlStructure;
|
||||
|
||||
class ContinueToken implements ControlStructure {
|
||||
|
||||
public string $token = "continue";
|
||||
|
||||
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
|
||||
return "<?php continue; ?>";
|
||||
}
|
||||
|
||||
}
|
|
@ -49,6 +49,7 @@ class DefaultRegistrations implements LanguageRegistration
|
|||
$compiler->registerControlStructure(new \Picea\ControlStructure\SwitchToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\DefaultToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\BreakToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\ContinueToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\ExtendsToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\SectionToken());
|
||||
$compiler->registerControlStructure(new \Picea\ControlStructure\BlockToken());
|
||||
|
|
Loading…
Reference in New Issue