Expand description
The C++ concrete syntax tree. Spec §1.
C++ has namespaces, templates and access sections; the tree has them as nodes rather than as flags. An access section is where it appears in the class, because that is what the output shows.
Structs§
- Alias
using Name = Type;- Base
- One base class.
- Block
- A block of statements.
- Catch
Clause - One handler of a
Statement::Try. - Class
class Name : bases { sections };- Constructor
- A constructor.
- Destructor
- A destructor.
- Enum
enum class Name : T { ... };- Enumerator
- One enumerator.
- Field
- A data member.
- File
- A C++ header or source file.
- Function
- A function at namespace scope.
- Method
- A member function.
- Namespace
namespace name { ... }- Param
- One parameter.
- Section
- One access section of a class.
- Switch
Case - One case of a switch.
- Template
template <..> <decl>- Template
Param - One template parameter.
- Variable
- A variable at namespace scope.
Enums§
- Access
- Access specifiers.
- Cast
Kind - Which cast form.
- Class
Member - One member of a class.
- Decl
- One declaration.
- Expr
- An expression.
- Function
Body - What follows a function’s signature.
- Primitive
- A C++ built-in type.
- Statement
- One statement.
- Template
Param Kind - Which kind of template parameter.
- Type
- A C++ type as it will be written.
Functions§
- escape_
keyword - The name a C++ keyword collision escapes to.