Skip to content

Commit 51874e8

Browse files
committed
Grammar: Add definition of "Item".
1 parent 5e296d2 commit 51874e8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/items.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Items
22

3+
> **<sup>Syntax:<sup>**\
4+
> _Item_:\
5+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Visibility_]<sup>?</sup>\
6+
> &nbsp;&nbsp; (\
7+
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; [_Module_]\
8+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_ExternCrate_]\
9+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_UseDeclaration_]\
10+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Function_]\
11+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_TypeAlias_]\
12+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Struct_]\
13+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Enumeration_]\
14+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Union_]\
15+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_ConstantItem_]\
16+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_StaticItem_]\
17+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Trait_]\
18+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_Implementation_]\
19+
> &nbsp;&nbsp; &nbsp;&nbsp; | [_ExternBlock_]\
20+
> &nbsp;&nbsp; &nbsp;&nbsp; | _Macro_\
21+
> &nbsp;&nbsp; &nbsp;&nbsp; | _MacroDefinition_\
22+
> &nbsp;&nbsp; )
23+
24+
[_OuterAttribute_]: attributes.html
25+
[_Visibility_]: visibility-and-privacy.html
26+
[_Module_]: items/modules.html
27+
[_ExternCrate_]: items/extern-crates.html
28+
[_UseDeclaration_]: items/use-declarations.html
29+
[_Function_]: items/functions.html
30+
[_TypeAlias_]: items/type-aliases.html
31+
[_Struct_]: items/structs.html
32+
[_Enumeration_]: items/enumerations.html
33+
[_Union_]: items/unions.html
34+
[_ConstantItem_]: items/constant-items.html
35+
[_StaticItem_]: items/static-items.html
36+
[_Trait_]: items/traits.html
37+
[_Implementation_]: items/implementations.html
38+
[_ExternBlock_]: items/extern-blocks.html
39+
340
An _item_ is a component of a crate. Items are organized within a crate by a
441
nested set of [modules]. Every crate has a single "outermost" anonymous module;
542
all further items within the crate have [paths] within the module tree of the

0 commit comments

Comments
 (0)