diff --git a/docs/future/project-file.md b/docs/future/project-file.md deleted file mode 100644 index b8d17f9..0000000 --- a/docs/future/project-file.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -sidebar_position: 140 ---- - -# Project files - -:::info -This functionality is not yet implemented -::: - -A Mew project file has the extension `.mewx`. - -Project files are normal `.mew` files, except that they -can have additional metadata that describes what references -to include, etc. - -### Example - -```mew -#name "Demo" - -#reference "../../foo.mewx" -#reference "../../bar.mewx" - -#load "utils.mew" -// ... -``` \ No newline at end of file diff --git a/docs/language/attributes.md b/docs/language/attributes.md index 5f96e32..0a92433 100644 --- a/docs/language/attributes.md +++ b/docs/language/attributes.md @@ -4,34 +4,18 @@ sidebar_position: 130 # Attributes -Attributes, indicated by the `[]` symbols, allows attachment of metadata, annotations, or special instructions to various language constructs, such as types, fields, and functions. - -* Metadata: Attributes provide metadata about code elements. This metadata can be used for documentation, code generation, and tooling. - -* Configuration: Attributes allow developers to configure the behavior of code elements. They can control aspects like visibility, serialization, and more. - -* Annotations: Attributes can annotate code with additional information, aiding in code analysis and understanding.ยจ +Attributes, indicated by the `[]` symbols, allows attachment of metadata, annotations, or special instructions to various language constructs, such as types, fields, and functions. ### Example -Let's explore an example to illustrate how attributes work in Mew: - ```mew -[foo(a: "arg1", b: "arg2")] +[foo("arg1", "arg2")] pub type Foo { - [bar(a: "arg1", b: "arg2")] + [bar("arg1", "arg2")] pub field Bar: i32; - [baz(a: "arg1", b: "arg2")] + [baz("arg1", "arg2")] pub fn Baz() { } } -``` - -In this example: - -* `[foo(a: "arg1", b: "arg2")]` is an attribute associated with the type `Foo`. - -* `[bar(a: "arg1", b: "arg2")]` is an attribute associated with the field `Bar`. - -* `[baz(a: "arg1", b: "arg2")]` is an attribute associated with the method `Baz`. +``` \ No newline at end of file diff --git a/docs/language/types.md b/docs/language/types.md index 8c20b9a..37e6e81 100644 --- a/docs/language/types.md +++ b/docs/language/types.md @@ -26,8 +26,6 @@ let person = new Person { ### Methods ```mew -use Mew; - pub type Clock { pub fn get_current_time() -> Timestamp { return Timestamp::Now; @@ -44,8 +42,6 @@ let now = clock.get_current_time(); #### Static methods ```mew -use Mew; - pub type Clock { pub static fn get_current_time() -> Timestamp { return Timestamp::Now;