Expand description
Item types for C++20 top-level declarations
Each variant of Item corresponds to a top-level declaration in a C++ translation unit,
following the naming conventions of syn::Item.
Structs§
- Attribute
- A C++20 attribute
[[...]], analogous tosyn::Attribute. - Base
Specifier - A base class specifier in a class/struct definition.
- Field
- A field (data member) in a struct, class, or union.
- Fields
Named - Named fields grouped by access specifier.
- FnArg
- A function argument, analogous to
syn::FnArg. - Generics
- Template generics on a class/struct/function.
- Ident
- An identifier with its source span, analogous to
syn::Ident. - Item
Class - A class definition (C++ specific).
- Item
Const - A const or constexpr variable, analogous to
syn::ItemConst. - Item
Constructor - A constructor declaration/definition.
- Item
Destructor - A destructor declaration/definition.
- Item
Enum - An enum definition, analogous to
syn::ItemEnum. - ItemFn
- A function declaration or definition, analogous to
syn::ItemFn. - Item
Foreign Mod - An extern block (
extern "C" { ... }), analogous tosyn::ItemForeignMod. - Item
Friend - A friend declaration.
- Item
Include - A
#includepreprocessor directive:#include <iostream>or#include "myfile.h". - Item
Macro - A preprocessor directive.
- Item
Namespace - A namespace declaration, analogous to
syn::ItemMod. - Item
Static - A static variable, analogous to
syn::ItemStatic. - Item
Static Assert - A static assertion (C++ specific).
- Item
Struct - A struct definition, analogous to
syn::ItemStruct. - Item
Template - A template declaration (C++ specific).
- Item
Type - A type alias (
using X = Y), analogous tosyn::ItemType. - Item
Typedef - A typedef declaration (C-style type alias).
- Item
Union - A union definition, analogous to
syn::ItemUnion. - Item
Verbatim - Tokens not interpreted by the parser, analogous to
syn::Item::Verbatim. - Member
Init - A member initializer in a constructor initializer list.
- Path
- A qualified path like
std::vectoror::global::Foo. - Path
Segment - A single segment of a path, analogous to
syn::PathSegment. - Signature
- A function signature, analogous to
syn::Signature. - Variant
- An enum variant, analogous to
syn::Variant.
Enums§
- Fields
- Fields of a struct, class, or union.
- Foreign
Item - A foreign item inside an
extern "C"block. - Include
Path - The path in a
#includedirective. - Item
- A top-level item (declaration) in a C++ translation unit.
- ItemUse
- A using declaration, directive, or alias, analogous to
syn::ItemUse. - Member
- A member inside a class/struct body.
- Template
Param - A template parameter.
- Visibility
- Visibility of a declaration.