slang::ast::IteratorSymbol class final

Represents an iterator variable created for array manipulation methods.

Base classes

class TempVarSymbol
Represents a temporary variable materialized within a limited scope such as a single expression.

Public variables

const Type& arrayType
The type of the array that this iterator traverses.
std::string_view indexMethodName
The name of the built-in "index" method, which can be customized by the user.
bool isLoopVariable
True if this is the loop variable of a foreach statement or constraint, as opposed to an iterator that exists only for the duration of a single expression (such as in an array method 'with' clause).

Variable documentation

std::string_view slang::ast::IteratorSymbol::indexMethodName

The name of the built-in "index" method, which can be customized by the user.

Some uses of IteratorSymbol don't allow an index method and set this value to the empty string.