private function getTokenFromMatch($match)
    {
        $value = $match[0];
        $offset = $match[1];

        // If we don't match at the beginning of the string, it fails.
        if ($offset !== 0)
            return null;

        if ($this->value) $value = $this->value;

        return new Token($value, $this->tokenType, $match[0]);
    }
private function getTokenFromMatch($match)
    {
        $value = $match[0];
        $offset = $match[1];

        // If we don't match at the beginning of the string, it fails.
        if ($offset !== 0)
            return null;

        if ($this->value) $value = $this->value;

        return new Token($value, $this->tokenType, $match[0]);
    }
private function getTokenFromMatch ( $ match ) { $ value = $ match [ 0 ] ; $ offset = $ match [ 1 ] ; // If we don't match at the beginning of the string, it fails. if ( $ offset !== 0 ) return null ; if ( $ this -> value ) $ value = $ this -> value ; return new Token ( $ value , $ this -> tokenType , $ match [ 0 ] ) ; }
Convert matching string to an actual Token.

@param string $match Matching text.
@retval Token Corresponding token.
Convert matching string to an actual Token .