slang::ast::HierarchicalReference::Element struct

An element in the hierarchical path.

Constructors, destructors, conversion operators

Element(const Symbol& symbol)
Constructs an element with a name selector.
Element(const Symbol& symbol, int32_t index)
Constructs an element with an index selector.
Element(const Symbol& symbol, std::pair<int32_t, int32_t> range)
Constructs an element with a range selector.

Public variables

not_null<const Symbol*> symbol
The symbol through which the path traverses.
std::variant<int32_t, std::pair<int32_t, int32_t>, std::string_view> selector
The selector used to get to the symbol, either an index if the parent was an array, or a field name.