Skip to main content

Module cpp

Module cpp 

Source
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.
CatchClause
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.
SwitchCase
One case of a switch.
Template
template <..> <decl>
TemplateParam
One template parameter.
Variable
A variable at namespace scope.

Enums§

Access
Access specifiers.
CastKind
Which cast form.
ClassMember
One member of a class.
Decl
One declaration.
Expr
An expression.
FunctionBody
What follows a function’s signature.
Primitive
A C++ built-in type.
Statement
One statement.
TemplateParamKind
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.