Пример #1
0
StringSet *EvalContextStackFrameAddMatchingSoft(const EvalContext *ctx, StringSet* base, const char *context_regex)
{
    if (SeqLength(ctx->stack) == 0)
    {
        return base;
    }

    return StringSetAddAllMatchingIterator(base, EvalContextStackFrameIteratorSoft(ctx), context_regex);
}
Пример #2
0
void SaveClassEnvironment(EvalContext *ctx, Writer *writer)
{
    {
        SetIterator it = EvalContextHeapIteratorHard(ctx);
        const char *context = NULL;
        while ((context = SetIteratorNext(&it)))
        {
            if (!EvalContextHeapContainsNegated(ctx, context))
            {
                WriterWriteF(writer, "%s\n", context);
            }
        }
    }

    {
        SetIterator it = EvalContextHeapIteratorSoft(ctx);
        const char *context = NULL;
        while ((context = SetIteratorNext(&it)))
        {
            if (!EvalContextHeapContainsNegated(ctx, context))
            {
                WriterWriteF(writer, "%s\n", context);
            }
        }
    }

    {
        SetIterator it = EvalContextStackFrameIteratorSoft(ctx);
        const char *context = NULL;
        while ((context = SetIteratorNext(&it)))
        {
            if (!EvalContextHeapContainsNegated(ctx, context))
            {
                WriterWriteF(writer, "%s\n", context);
            }
        }
    }
}