Commit version 24.12.13800
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user