slang::SyntaxListBase class

A base class for syntax nodes that represent a list of items.

Base classes

class SyntaxNode
Base class for all syntax nodes.

Derived classes

template<typename T>
class SeparatedSyntaxList
template<typename T>
class SyntaxList
A syntax node that represents a list of child syntax nodes.
class TokenList
A syntax node that represents a list of child tokens.
template<typename T>
class SyntaxList
A syntax node that represents a list of child syntax nodes.

Public functions

auto getChildCount() const -> size_t
Gets the number of child items in the node.
auto getChild(size_t index) -> TokenOrSyntax pure virtual
Gets the child (token or node) at the given index.
auto getChild(size_t index) const -> ConstTokenOrSyntax pure virtual
Gets the child (token or node) at the given index.
void setChild(size_t index, TokenOrSyntax child) pure virtual
Sets the child (token or node) at the given index.
auto clone(BumpAllocator& alloc) const -> SyntaxListBase* pure virtual
Clones the list into a new node using the provided allocator.
void resetAll(BumpAllocator& alloc, span<const TokenOrSyntax> children) pure virtual

Function documentation

void slang::SyntaxListBase::resetAll(BumpAllocator& alloc, span<const TokenOrSyntax> children) pure virtual

Overwrites all children with the new set of provided children (and making a copy with the provided allocator).