slang/syntax/SyntaxNode.h file

Base class and utilities for syntax nodes.

Namespaces

namespace slang
Root namespace.
namespace slang::syntax
Syntax tree manipulation.

Classes

struct slang::syntax::ConstTokenOrSyntax
A token or a constant syntax node.
struct slang::syntax::TokenOrSyntax
A token or a syntax node.
class slang::syntax::SyntaxNode
Base class for all syntax nodes.
class slang::syntax::DeferredSourceRange
Represents a source range or a way to get one by materializing it from a syntax node.
class slang::syntax::SyntaxListBase
A base class for syntax nodes that represent a list of items.
template<typename T>
class slang::syntax::SyntaxList
A syntax node that represents a list of child syntax nodes.
class slang::syntax::TokenList
A syntax node that represents a list of child tokens.
template<typename T>
class slang::syntax::SeparatedSyntaxList
A syntax node that represents a token-separated list of child syntax nodes.
template<typename U>
class slang::syntax::SeparatedSyntaxList::iterator_base
An iterator that will iterate over just the nodes (and skip the delimiters) in the parent SeparatedSyntaxList.

Functions

auto clone(const SyntaxNode& node, BumpAllocator& alloc) -> SyntaxNode*
Performs a shallow clone of the given syntax node.
auto deepClone(const SyntaxNode& node, BumpAllocator& alloc) -> SyntaxNode*
Performs a deep clone of the given syntax node.
template<std::derived_from<SyntaxNode> T>
auto clone(const T& node, BumpAllocator& alloc) -> T*
Performs a shallow clone of the given syntax node.
template<std::derived_from<SyntaxNode> T>
auto deepClone(const T& node, BumpAllocator& alloc) -> T*
Performs a deep clone of the given syntax node.