* Support php 5.3 for sql parser lib.
This commit is contained in:
+8
-5
@@ -1,18 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exception thrown by the lexer.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\SqlParser\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Exception thrown by the lexer.
|
||||
*
|
||||
* @category Exceptions
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
|
||||
*/
|
||||
class LexerException extends Exception
|
||||
class LexerException extends \Exception
|
||||
{
|
||||
/**
|
||||
* The character that produced this error.
|
||||
@@ -29,6 +30,8 @@ class LexerException extends Exception
|
||||
public $pos;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @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
|
||||
|
||||
+8
-5
@@ -1,18 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exception thrown by the lexer.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\SqlParser\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Exception thrown by the lexer.
|
||||
*
|
||||
* @category Exceptions
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
|
||||
*/
|
||||
class LoaderException extends Exception
|
||||
class LoaderException extends \Exception
|
||||
{
|
||||
/**
|
||||
* The failed load name.
|
||||
@@ -22,6 +23,8 @@ class LoaderException extends Exception
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @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
|
||||
|
||||
+9
-5
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exception thrown by the parser.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\SqlParser\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use PhpMyAdmin\SqlParser\Token;
|
||||
|
||||
/**
|
||||
* Exception thrown by the parser.
|
||||
*
|
||||
* @category Exceptions
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
|
||||
*/
|
||||
class ParserException extends Exception
|
||||
class ParserException extends \Exception
|
||||
{
|
||||
/**
|
||||
* The token that produced this error.
|
||||
@@ -23,11 +25,13 @@ class ParserException extends Exception
|
||||
public $token;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @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)
|
||||
public function __construct($msg = '', Token $token = null, $code = 0)
|
||||
{
|
||||
parent::__construct($msg, $code);
|
||||
$this->token = $token;
|
||||
|
||||
Reference in New Issue
Block a user