private function match($token)
    {
        if (!$this->lexer->isNextToken($token)) {
            throw SyntaxException::expectedToken(
                $this->lexer->getLiteral($token),
                null,
                $this->lexer
            );
        }

        return $this->lexer->moveNext();
    }
private function match($token)
    {
        if (!$this->lexer->isNextToken($token)) {
            throw SyntaxException::expectedToken(
                $this->lexer->getLiteral($token),
                null,
                $this->lexer
            );
        }

        return $this->lexer->moveNext();
    }
private function match ( $ token ) { if ( ! $ this -> lexer -> isNextToken ( $ token ) ) { throw SyntaxException :: expectedToken ( $ this -> lexer -> getLiteral ( $ token ) , null , $ this -> lexer ) ; } return $ this -> lexer -> moveNext ( ) ; }
Matches the next token and advances.

@param integer $token The next token to match.

@return array|null TRUE if the next token matches, FALSE if not.

@throws Exception
@throws SyntaxException If a syntax error is found.
Matches the next token and advances .