Skip to content

Commit dabd833

Browse files
committed
fix(parser): correct token stream cursor property type
Signed-off-by: azjezz <[email protected]>
1 parent fb0226c commit dabd833

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Parser/TokenStream.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
final class TokenStream implements HasCursorInterface
2323
{
2424
private LexerInterface $lexer;
25+
26+
/**
27+
* @var int<0, max> The current cursor position.
28+
*/
2529
private int $cursor = 0;
2630

2731
/**
@@ -36,6 +40,8 @@ public function __construct(LexerInterface $lexer)
3640

3741
/**
3842
* Returns the position at the *end* of the most recently consumed significant token.
43+
*
44+
* @return int<0, max> The current cursor position.
3945
*/
4046
#[Override]
4147
public function cursorPosition(): int

0 commit comments

Comments
 (0)