first commit

This commit is contained in:
dev@siliconpin.com
2025-08-07 11:53:41 +05:30
commit a3067c5ad4
4795 changed files with 782758 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Exceptions;
use Exception;
/**
* Exception thrown by the lexer.
*/
class LexerException extends Exception
{
/**
* The character that produced this error.
*
* @var string
*/
public $ch;
/**
* The index of the character that produced this error.
*
* @var int
*/
public $pos;
/**
* @param string $msg the message of this exception
* @param string $ch the character that produced this exception
* @param int $pos the position of the character
* @param int $code the code of this error
*/
public function __construct($msg = '', $ch = '', $pos = 0, $code = 0)
{
parent::__construct($msg, $code);
$this->ch = $ch;
$this->pos = $pos;
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Exceptions;
use Exception;
/**
* Exception thrown by the lexer.
*/
class LoaderException extends Exception
{
/**
* The failed load name.
*
* @var string
*/
public $name;
/**
* @param string $msg the message of this exception
* @param string $name the character that produced this exception
* @param int $code the code of this error
*/
public function __construct($msg = '', $name = '', $code = 0)
{
parent::__construct($msg, $code);
$this->name = $name;
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Exceptions;
use Exception;
use PhpMyAdmin\SqlParser\Token;
/**
* Exception thrown by the parser.
*/
class ParserException extends Exception
{
/**
* The token that produced this error.
*
* @var Token
*/
public $token;
/**
* @param string $msg the message of this exception
* @param Token $token the token that produced this exception
* @param int $code the code of this error
*/
public function __construct($msg = '', ?Token $token = null, $code = 0)
{
parent::__construct($msg, $code);
$this->token = $token;
}
}