slang::TokenList class

A syntax node that represents a list of child tokens.

Contents

Base classes

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

Private functions

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

Function documentation

void slang::TokenList::resetAll(BumpAllocator& alloc, span<const TokenOrSyntax> children) final private

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