cda-group / arc

Programming Language for Continuous Deep Analytics
https://cda-group.github.io/arc/
44 stars 6 forks source link

Fix so enum-ops can be prefixed with module name #242

Closed segeljakt closed 3 years ago

segeljakt commented 3 years ago

Now it is possible to have three kinds of paths in ops:

unwrap!(my_module::MyEnum::MyVariant, x);
unwrap!(MyEnum::MyVariant, x);
unwrap!(MyVariant, x);

One day I will try to generalise the solution to any kind of path. It's tricky with Rust-macros.

segeljakt commented 3 years ago

Declarative macros are like regex, they are write-only.