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