#include "compiler.ih"

bool Compiler::nextSource()
{
    while (true)
    {
        d_fileIter = find_if(d_fileIter, d_end,
            [&](Element const &element)
            {
                return element.type == SRC;
            }
        );

        if (d_fileIter != d_end)                    // found a source file
            return true;

        if (++d_current == d_map.end())             // no more entries
            return false;

        setFileIterators();
    }
}
