This is done by implementing the required functions for your custom type. Sadly I could not solve this by using the regular traits like `Add`, since I can't easily check if a different trait is implemented.
|7 months ago|
|src||7 months ago|
|.gitignore||7 months ago|
|Cargo.lock||7 months ago|
|Cargo.toml||7 months ago|
|README.md||7 months ago|
|test.foo||7 months ago|
i guess it's an embedded language?
Some basic types: String, char, int, float, bool
Custom rust types: if it implements
CustomValue, it can be used
Any function is also a method, as long as it has at least one parameter. The same also works the other way around.
Some control flow:
Functions: can be defined in both the language and in Rust.
The functions support a return in the form of
return x; and
x as the last element.
As long as the final element is an expression of some kind, it will be seen as a return value in a function.
For some sample code, check
test.foo (extension also TBD)