You’re reading a draft of the Ferrocene Language Specification. Some parts of this document might be missing, incomplete or incorrect. Our aim is to have the specification ready by the end of 2022.

3. Items


Item ::=
    OuterAttributeOrDoc* (ItemWithVisibility | MacroItem)

ItemWithVisibility ::=
    VisibilityModifier? (
      | EnumDeclaration
      | ExternalBlock
      | ExternalCrateImport
      | FunctionDeclaration
      | Implementation
      | ModuleDeclaration
      | StaticDeclaration
      | StructDeclaration
      | TraitDeclaration
      | TypeAliasDeclaration
      | UnionDeclaration
      | UseImport

MacroItem ::=
  | TerminatedMacroInvocation

Legality Rules

3:1 The macro expansion of a terminated macro invocation is treated as zero or more items if the terminated macro invocation appears as an item.

Dynamic Semantics

3:2 Elaboration is the process by which a declaration achieves its runtime effects.