| 1 |
<?php |
| 2 |
|
| 3 |
declare (strict_types=1); |
| 4 |
namespace WCPOS\Vendor\Sabberworm\CSS\Parsing; |
| 5 |
|
| 6 |
/** |
| 7 |
* @internal since 8.7.0 |
| 8 |
*/ |
| 9 |
class Anchor |
| 10 |
{ |
| 11 |
/** |
| 12 |
* @var int<0, max> |
| 13 |
*/ |
| 14 |
private $position; |
| 15 |
/** |
| 16 |
* @var ParserState |
| 17 |
*/ |
| 18 |
private $parserState; |
| 19 |
/** |
| 20 |
* @param int<0, max> $position |
| 21 |
*/ |
| 22 |
public function __construct(int $position, ParserState $parserState) |
| 23 |
{ |
| 24 |
$this->position = $position; |
| 25 |
$this->parserState = $parserState; |
| 26 |
} |
| 27 |
public function backtrack() : void |
| 28 |
{ |
| 29 |
$this->parserState->setPosition($this->position); |
| 30 |
} |
| 31 |
} |
| 32 |
|