private function number()
    {
        // If next token is a float match and return it
        if ($this->lexer->isNextToken(Lexer::T_FLOAT)) {
            return $this->match(Lexer::T_FLOAT);
        }

        // If next token is an integer match and return it
        if ($this->lexer->isNextToken(Lexer::T_INTEGER)) {
            return $this->match(Lexer::T_INTEGER);
        }

        // Throw exception since no match
        throw $this->syntaxError('CrEOF\Geo\String\Lexer::T_INTEGER or CrEOF\Geo\String\Lexer::T_FLOAT');
    }
private function number()
    {
        // If next token is a float match and return it
        if ($this->lexer->isNextToken(Lexer::T_FLOAT)) {
            return $this->match(Lexer::T_FLOAT);
        }

        // If next token is an integer match and return it
        if ($this->lexer->isNextToken(Lexer::T_INTEGER)) {
            return $this->match(Lexer::T_INTEGER);
        }

        // Throw exception since no match
        throw $this->syntaxError('CrEOF\Geo\String\Lexer::T_INTEGER or CrEOF\Geo\String\Lexer::T_FLOAT');
    }
private function number ( ) { // If next token is a float match and return it if ( $ this -> lexer -> isNextToken ( Lexer :: T_FLOAT ) ) { return $ this -> match ( Lexer :: T_FLOAT ) ; } // If next token is an integer match and return it if ( $ this -> lexer -> isNextToken ( Lexer :: T_INTEGER ) ) { return $ this -> match ( Lexer :: T_INTEGER ) ; } // Throw exception since no match throw $ this -> syntaxError ( 'CrEOF\Geo\String\Lexer::T_INTEGER or CrEOF\Geo\String\Lexer::T_FLOAT' ) ; }
Match integer or float token and return value

@return int|float
@throws UnexpectedValueException
Match integer or float token and return value