$arguments */ public function call(array $arguments = []): self { return new self(new CallNode($this, $arguments)); } /** * @param non-empty-string $method * @param array $arguments */ public function callMethod(string $method, array $arguments = []): self { return new self(new MethodCallNode($this, $method, $arguments)); } public function different(Node $right): self { return new self(new DifferentNode($this, $right)); } public function equals(Node $right): self { return new self(new EqualsNode($this, $right)); } /** * @no-named-arguments */ public function or(Node ...$nodes): self { return new self(new LogicalOrNode($this, ...$nodes)); } /** * @param class-string $className */ public function instanceOf(string $className): self { return new self(new InstanceOfNode($this, $className)); } public function isLessThan(Node $right): self { return new self(new LessThanNode($this, $right)); } public function isLessOrEqualsTo(Node $right): self { return new self(new LessOrEqualsToNode($this, $right)); } public function isGreaterThan(Node $right): self { return new self(new GreaterThanNode($this, $right)); } public function isGreaterOrEqualsTo(Node $right): self { return new self(new GreaterOrEqualsToNode($this, $right)); } public function compile(Compiler $compiler): Compiler { return $compiler->compile($this->node); } }