Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/items/modules.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Modules

A module is a container for zero or more [items].
> **<sup>Syntax:<sup>**
> _Module_ :
> &nbsp;&nbsp; &nbsp;&nbsp; `mod` [IDENTIFIER] `;`
> &nbsp;&nbsp; | `mod` [IDENTIFIER] `{`
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; [_InnerAttribute_]<sup>\*</sup>
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; [_Item_]<sup>\*</sup>
> &nbsp;&nbsp; &nbsp;&nbsp; `}`

[items]: items.html
A module is a container for zero or more [items].

A _module item_ is a module, surrounded in braces, named, and prefixed with the
keyword `mod`. A module item introduces a new, named module into the tree of
Expand Down Expand Up @@ -61,3 +67,11 @@ mod thread {
mod local_data;
}
```

[IDENTIFIER]: identifiers.html

[_InnerAttribute_]: attributes.html
[_OuterAttribute_]: attributes.html

[_Item_]: items.html
[items]: items.html