package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -29,34 +29,23 @@ class TokenStream
/**
* @var Token[]
*/
private $tokens = [];
private array $tokens = [];
/**
* @var Token[]
*/
private $used = [];
private array $used = [];
/**
* @var int
*/
private $cursor = 0;
/**
* @var Token|null
*/
private $peeked;
/**
* @var bool
*/
private $peeking = false;
private int $cursor = 0;
private ?Token $peeked;
private bool $peeking = false;
/**
* Pushes a token.
*
* @return $this
*/
public function push(Token $token): self
public function push(Token $token): static
{
$this->tokens[] = $token;
@@ -68,7 +57,7 @@ class TokenStream
*
* @return $this
*/
public function freeze(): self
public function freeze(): static
{
return $this;
}