slang::ast::EvalContext::ActiveIterator struct

The current position of an array method iterator that is active during evaluation, which is needed if the iterator's index method is called.

These are owned by the array method being evaluated and are linked together to avoid any allocations, since the index method is rarely used.

Public variables

const ValueSymbol& symbol
The iterator variable.
uint64_t offset
The offset of the current element within the array or queue.
const ConstantValue* key
The key of the current element, if iterating an associative array.
const ActiveIterator* prev
The previously active iterator, if any.