Skip to content

Commit

Permalink
Merge pull request #143 from brauliobz/modules
Browse files Browse the repository at this point in the history
Modules grammar
  • Loading branch information
Havvy authored Oct 16, 2017
2 parents 37cc523 + 154e392 commit 2ad641c
Showing 1 changed file with 16 additions and 2 deletions.
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

0 comments on commit 2ad641c

Please sign in to comment.