From 154e39265b45ddecad5db59bc03a7b363a957969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Sat, 14 Oct 2017 14:00:32 -0300 Subject: [PATCH] Modules grammar --- src/items/modules.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/items/modules.md b/src/items/modules.md index 4ab8ea128..43a960b22 100644 --- a/src/items/modules.md +++ b/src/items/modules.md @@ -1,8 +1,14 @@ # Modules -A module is a container for zero or more [items]. +> **Syntax:** +> _Module_ : +>       `mod` [IDENTIFIER] `;` +>    | `mod` [IDENTIFIER] `{` +>         [_InnerAttribute_]\* +>         [_Item_]\* +>       `}` -[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 @@ -61,3 +67,11 @@ mod thread { mod local_data; } ``` + +[IDENTIFIER]: identifiers.html + +[_InnerAttribute_]: attributes.html +[_OuterAttribute_]: attributes.html + +[_Item_]: items.html +[items]: items.html