slang::ast::DefinitionSymbol::ParameterDecl struct

Information about a single parameter declaration.

Constructors, destructors, conversion operators

ParameterDecl(const Scope& scope, const syntax::ParameterDeclarationSyntax& syntax, const syntax::DeclaratorSyntax& decl, bool isLocal, bool isPort, std::span<const syntax::AttributeInstanceSyntax*const> attributes)
Constructs a new ParameterDecl instance.
ParameterDecl(const Scope& scope, const syntax::TypeParameterDeclarationSyntax& syntax, const syntax::TypeAssignmentSyntax& decl, bool isLocal, bool isPort, std::span<const syntax::AttributeInstanceSyntax*const> attributes)
Constructs a new ParameterDecl instance.
ParameterDecl(std::string_view name, SourceLocation location, const Type& givenType, bool isLocal, bool isPort, const Expression* givenInitializer)
Constructs a new ParameterDecl instance.
ParameterDecl(std::string_view name, SourceLocation location, bool isLocal, bool isPort, const Type* defaultType)
Constructs a new ParameterDecl instance.

Public functions

auto hasDefault() const -> bool
Indicates whether this parameter has a default value expression.

Public variables

std::string_view name
The name of the parameter.
SourceLocation location
The source location where the parameter is defined.
std::span<const syntax::AttributeInstanceSyntax*const > attributes
Attributes associated with the parameter.
bool isTypeParam
True if this is a type parameter.
bool isLocalParam
True if this is a localparam.
bool isPortParam
True if this parameter is declared in the definition's port list.
bool hasSyntax
True if there is a syntax node associated with this parameter.

Variable documentation

bool slang::ast::DefinitionSymbol::ParameterDecl::hasSyntax

True if there is a syntax node associated with this parameter.

This controls which members of the unions are valid.