Skip to main content

Module item

Module item 

Source
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 to syn::Attribute.
BaseSpecifier
A base class specifier in a class/struct definition.
Field
A field (data member) in a struct, class, or union.
FieldsNamed
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.
ItemClass
A class definition (C++ specific).
ItemConst
A const or constexpr variable, analogous to syn::ItemConst.
ItemConstructor
A constructor declaration/definition.
ItemDestructor
A destructor declaration/definition.
ItemEnum
An enum definition, analogous to syn::ItemEnum.
ItemFn
A function declaration or definition, analogous to syn::ItemFn.
ItemForeignMod
An extern block (extern "C" { ... }), analogous to syn::ItemForeignMod.
ItemFriend
A friend declaration.
ItemInclude
A #include preprocessor directive: #include <iostream> or #include "myfile.h".
ItemMacro
A preprocessor directive.
ItemNamespace
A namespace declaration, analogous to syn::ItemMod.
ItemStatic
A static variable, analogous to syn::ItemStatic.
ItemStaticAssert
A static assertion (C++ specific).
ItemStruct
A struct definition, analogous to syn::ItemStruct.
ItemTemplate
A template declaration (C++ specific).
ItemType
A type alias (using X = Y), analogous to syn::ItemType.
ItemTypedef
A typedef declaration (C-style type alias).
ItemUnion
A union definition, analogous to syn::ItemUnion.
ItemVerbatim
Tokens not interpreted by the parser, analogous to syn::Item::Verbatim.
MemberInit
A member initializer in a constructor initializer list.
Path
A qualified path like std::vector or ::global::Foo.
PathSegment
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.
ForeignItem
A foreign item inside an extern "C" block.
IncludePath
The path in a #include directive.
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.
TemplateParam
A template parameter.
Visibility
Visibility of a declaration.