Just fixing an obvious typo in my code (that is still incomplete).
====

struct someRange
{
    ulong seq;
    bool fresh = true;
    long line;
    dchar front;
    // and lets just pretend that there is
    // somewhere for more characters to come from!

    void popFront()
    {
        // advance by whatever means to update front.
        if (front.isNewline)
        {
            ++line;
            fresh = true;
            return;
        }
        if (fresh)
        {
            if (front.isTab)
            {
                seq = 0xffff_ffff_ffff_fffeL;
            }
            else
            {
                seq = 0x1L;
            }
            fresh = false;
        }
        else
        {
            seq <<= 1;
            if (!front.isTab)
            {
                seq |= 0x1L;
            }
        }
    }

    // and the rest...
}

Reply via email to