slang::VariableSymbol class

Represents a variable declaration.

Base classes

class ValueSymbol

Derived classes

class FieldSymbol
Represents a field member of a struct or union.
class FormalArgumentSymbol
Represents a formal argument in subroutine (task or function).

Public static functions

static void fromSyntax(Compilation& compilation, const DataDeclarationSyntax& syntax, const Scope& scope, SmallVector<const ValueSymbol*>& results)

Public variables

bool isConstant
The variable is marked constant and can't be modified.
bool isCompilerGenerated
int32_t foreachIndex

Function documentation

static void slang::VariableSymbol::fromSyntax(Compilation& compilation, const DataDeclarationSyntax& syntax, const Scope& scope, SmallVector<const ValueSymbol*>& results)

Constructs all variable symbols specified by the given syntax node. Note that this might actually construct net symbols if the data type syntax refers to a user defined net type or alias.

Variable documentation

bool slang::VariableSymbol::isCompilerGenerated

The compiler created this variable, as opposed to it being declared in the user's source code.

int32_t slang::VariableSymbol::foreachIndex

If this is a foreach loop variable, specifies a 1-based dimension index that this variable loops over. Otherwise this is zero.