mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
notice
appears when expression unexpectedly ends
This commit is contained in:
parent
493fcce6e0
commit
52fea74cc4
@ -503,7 +503,7 @@ class Tokenizer
|
|||||||
public function skip( /*$token1, $token2, ...*/)
|
public function skip( /*$token1, $token2, ...*/)
|
||||||
{
|
{
|
||||||
if (func_num_args()) {
|
if (func_num_args()) {
|
||||||
if ($this->_valid(func_get_args(), $this->curr[0])) {
|
if ($this->curr && $this->_valid(func_get_args(), $this->curr[0])) {
|
||||||
$this->next();
|
$this->next();
|
||||||
return $this;
|
return $this;
|
||||||
} else {
|
} else {
|
||||||
@ -538,7 +538,7 @@ class Tokenizer
|
|||||||
*/
|
*/
|
||||||
public function need($token1 /*, $token2, ...*/)
|
public function need($token1 /*, $token2, ...*/)
|
||||||
{
|
{
|
||||||
if ($this->_valid(func_get_args(), $this->curr[0])) {
|
if ($this->curr && $this->_valid(func_get_args(), $this->curr[0])) {
|
||||||
return $this;
|
return $this;
|
||||||
} else {
|
} else {
|
||||||
throw new UnexpectedTokenException($this, func_get_args());
|
throw new UnexpectedTokenException($this, func_get_args());
|
||||||
|
Loading…
Reference in New Issue
Block a user