Use CPP in full code base

This commit is contained in:
andreybolonin1989@gmail.com
2024-08-24 11:31:27 +03:00
committed by Fabien Potencier
parent 75d888f2e0
commit 28923f4269
23 changed files with 74 additions and 119 deletions
+4 -6
View File
@@ -47,18 +47,16 @@ class ExpressionParser
public const OPERATOR_LEFT = 1;
public const OPERATOR_RIGHT = 2;
private $parser;
private $env;
/** @var array<string, array{precedence: int, class: class-string<AbstractUnary>}> */
private $unaryOperators;
/** @var array<string, array{precedence: int, class: class-string<AbstractBinary>, associativity: self::OPERATOR_*}> */
private $binaryOperators;
private $readyNodes = [];
public function __construct(Parser $parser, Environment $env)
{
$this->parser = $parser;
$this->env = $env;
public function __construct(
private Parser $parser,
private Environment $env,
) {
$this->unaryOperators = $env->getUnaryOperators();
$this->binaryOperators = $env->getBinaryOperators();
}