2023-10-18 00:10:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Lean;
|
|
|
|
|
|
|
|
use Picea\Compiler;
|
|
|
|
use Picea\Language\DefaultRegistrations;
|
|
|
|
use Picea\{ Ui\Ui, Asset\Asset };
|
|
|
|
|
|
|
|
class PiceaDefaultRegistration extends DefaultRegistrations {
|
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
protected array $extensions,
|
|
|
|
protected array $syntaxes,
|
|
|
|
protected array $controlStructures,
|
|
|
|
public null|Ui $ui,
|
|
|
|
public null|Asset $asset,
|
|
|
|
) {
|
|
|
|
parent::__construct($this->extensions, $this->syntaxes, $this->controlStructures);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function registerAll(Compiler $compiler) : void
|
|
|
|
{
|
|
|
|
parent::registerAll($compiler);
|
|
|
|
|
2023-10-18 18:03:46 +00:00
|
|
|
$this->ui AND $this->ui->registerFormExtension($compiler);
|
|
|
|
$this->asset AND $this->asset->registerExtension($compiler);
|
2023-10-18 00:10:42 +00:00
|
|
|
}
|
|
|
|
}
|