clang 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::syntax::List Class Reference

A list of Elements separated or terminated by a fixed token. More...

#include "clang/Tooling/Syntax/Tree.h"

Inheritance diagram for clang::syntax::List:
Inheritance graph
[legend]

Classes

struct  ElementAndDelimiter
 

Public Types

enum class  TerminationKind { Terminated , MaybeTerminated , Separated }
 

Public Member Functions

std::vector< ElementAndDelimiter< Node > > getElementsAsNodesAndDelimiters ()
 Returns the elements and corresponding delimiters.
 
std::vector< Node * > getElementsAsNodes ()
 Returns the elements of the list.
 
clang::tok::TokenKind getDelimiterTokenKind () const
 Returns the appropriate delimiter for this list.
 
TerminationKind getTerminationKind () const
 
bool canBeEmpty () const
 Whether this list can be empty in syntactically and semantically correct code.
 
- Public Member Functions inherited from clang::syntax::Tree
NodegetFirstChild ()
 
const NodegetFirstChild () const
 
NodegetLastChild ()
 
const NodegetLastChild () const
 
const LeaffindFirstLeaf () const
 
LeaffindFirstLeaf ()
 
const LeaffindLastLeaf () const
 
LeaffindLastLeaf ()
 
llvm::iterator_range< ChildIteratorgetChildren ()
 
llvm::iterator_range< ConstChildIteratorgetChildren () const
 
const NodefindChild (NodeRole R) const
 Find the first node with a corresponding role.
 
NodefindChild (NodeRole R)
 
- Public Member Functions inherited from clang::syntax::Node
 Node (const Node &)=delete
 Nodes cannot simply be copied without violating tree invariants.
 
Nodeoperator= (const Node &)=delete
 
 Node (Node &&)=delete
 Idiomatically, nodes are allocated on an Arena and never moved.
 
Node