diff --git a/content/mimiumのモジュールシステム.md b/content/mimiumのモジュールシステム.md index 85f2fce0..fcc7999e 100644 --- a/content/mimiumのモジュールシステム.md +++ b/content/mimiumのモジュールシステム.md @@ -6,18 +6,32 @@ 分割コンパイルできる、かつ、意味論的にもある程度一貫性がある +#### モジュール内での宣言一覧 ```rust -//関数のvisibilityセッティングはRustとおなじで +//関数のvisibilityセッティングはRustとおなじ感じ pub fn (){ } -pub const hoge = 100 +pub const Foo = 100 +type Bar = Constructor(()->float) //新しい型宣言 +type alias Hoge = ()->float //エイリアス宣言 +``` +#### モジュールの宣言 + +```rust +mod(macro) modname{ + +} ``` ``` Program = FunctionDefinition |GlobalDeclaration |ModuleDeclaration + |use ModuleName +ModuleDeclaration = Visibility(stage) { Program } + + ``` \ No newline at end of file