| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* SCSSPHP |
| 5 |
* |
| 6 |
* @copyright 2012-2020 Leaf Corcoran |
| 7 |
* |
| 8 |
* @license http://opensource.org/licenses/MIT MIT |
| 9 |
* |
| 10 |
* @link http://scssphp.github.io/scssphp |
| 11 |
*/ |
| 12 |
|
| 13 |
namespace ScssPhp\ScssPhp\Exception; |
| 14 |
|
| 15 |
/** |
| 16 |
* Parser Exception |
| 17 |
* |
| 18 |
* @author Oleksandr Savchenko <traveltino@gmail.com> |
| 19 |
* |
| 20 |
* @internal |
| 21 |
*/ |
| 22 |
class ParserException extends \Exception implements SassException |
| 23 |
{ |
| 24 |
/** |
| 25 |
* @var array|null |
| 26 |
* @phpstan-var array{string, int, int}|null |
| 27 |
*/ |
| 28 |
private $sourcePosition; |
| 29 |
|
| 30 |
/** |
| 31 |
* Get source position |
| 32 |
* |
| 33 |
* @api |
| 34 |
* |
| 35 |
* @return array|null |
| 36 |
* @phpstan-return array{string, int, int}|null |
| 37 |
*/ |
| 38 |
public function getSourcePosition() |
| 39 |
{ |
| 40 |
return $this->sourcePosition; |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Set source position |
| 45 |
* |
| 46 |
* @api |
| 47 |
* |
| 48 |
* @param array $sourcePosition |
| 49 |
* |
| 50 |
* @return void |
| 51 |
* |
| 52 |
* @phpstan-param array{string, int, int} $sourcePosition |
| 53 |
*/ |
| 54 |
public function setSourcePosition($sourcePosition) |
| 55 |
{ |
| 56 |
$this->sourcePosition = $sourcePosition; |
| 57 |
} |
| 58 |
} |
| 59 |
|