Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -20,7 +20,7 @@ final class Cursor
$this->tokens = $tokens;
}
public function next(int $exceptTokenType = null)
public function next(?int $exceptTokenType = null): ?Token
{
while ($token = $this->tokens[++$this->position] ?? null) {
if ($exceptTokenType !== null && $token->isOfType($exceptTokenType)) {
@ -33,7 +33,7 @@ final class Cursor
return null;
}
public function previous(int $exceptTokenType = null)
public function previous(?int $exceptTokenType = null): ?Token
{
while ($token = $this->tokens[--$this->position] ?? null) {
if ($exceptTokenType !== null && $token->isOfType($exceptTokenType)) {
@ -46,7 +46,7 @@ final class Cursor
return null;
}
public function subCursor() : self
public function subCursor(): self
{
$cursor = new self($this->tokens);
$cursor->position = $this->position;