slang::syntax::CompilationUnitSyntax struct
#include <AllSyntax.h>

Concrete syntax definition for a CompilationUnit.

Base classes

class SyntaxNode
Base class for all syntax nodes.

Public static functions

static auto isKind(SyntaxKind kind) -> bool
Returns true if the provided syntax kind is represented by this type.

Constructors, destructors, conversion operators

CompilationUnitSyntax(const SyntaxList<MemberSyntax>& members, Token endOfFile)
Constructs a new instance of the CompilationUnitSyntax struct.
CompilationUnitSyntax(const CompilationUnitSyntax&) defaulted explicit
Copy constructor.

Public functions

auto getChild(size_t index) -> TokenOrSyntax
Gets the child member (token or syntax node) at the provided index within this struct.
auto getChild(size_t index) const -> ConstTokenOrSyntax
Gets the child member (token or syntax node) as a pointer at the provided index within this struct.
auto getChildPtr(size_t index) -> PtrTokenOrSyntax
Gets the child member (token or syntax node) at the provided index within this struct.
void setChild(size_t index, TokenOrSyntax child)
Sets the child member (token or syntax node) at the provided index within this struct.

Public variables

SyntaxList<MemberSyntax> members
The members member.
Token endOfFile
The endOfFile member.