Skip to content

Commit

Permalink
Clean up some things
Browse files Browse the repository at this point in the history
  • Loading branch information
patriksvensson committed Oct 29, 2024
1 parent 062db4c commit 0efab39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 52 deletions.
27 changes: 0 additions & 27 deletions docs/future/project-file.md

This file was deleted.

26 changes: 5 additions & 21 deletions docs/language/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
```
4 changes: 0 additions & 4 deletions docs/language/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ let person = new Person {
### Methods

```mew
use Mew;
pub type Clock {
pub fn get_current_time() -> Timestamp {
return Timestamp::Now;
Expand All @@ -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;
Expand Down

0 comments on commit 0efab39

Please sign in to comment.