PistonDevelopers / dyon

A rusty dynamically typed scripting language
Apache License 2.0
1.77k stars 55 forks source link

Rust object shorthand syntax in macros #661

Open bvssvni opened 4 years ago

bvssvni commented 4 years ago

Dyon supports a shorthand syntax for Rust objects in the dyon_fn macro:

dyon_fn{fn foo(a: #Foo) {
    ...
}}

One can also use #Foo as return type:

dyon_fn{fn new_foo() -> #Foo { ... }}