2022-07-03 23:45:34 +02:00
|
|
|
# Name TBD
|
|
|
|
> i guess it's an embedded language?
|
|
|
|
|
|
|
|
# Features
|
|
|
|
Math: `+`, `-`, `*`, `/`, `%`
|
2022-07-03 23:46:45 +02:00
|
|
|
|
2022-07-03 23:45:34 +02:00
|
|
|
Equality: `==`, `!=`, `>`, `<`, `>=`, `<=`
|
|
|
|
|
|
|
|
Some basic types: String, char, int, float, bool
|
|
|
|
|
|
|
|
Custom rust types: if it implements `CustomValue`, it can be used
|
|
|
|
|
|
|
|
Functions: `foo(x)`
|
|
|
|
|
|
|
|
Methods: `x.foo()`
|
|
|
|
|
|
|
|
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: `while` and `if/else if/else`
|
|
|
|
|
|
|
|
Functions: can be defined in both the language and in Rust.
|
|
|
|
|
2022-07-04 15:36:03 +02:00
|
|
|
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.
|
2022-07-03 23:45:34 +02:00
|
|
|
|
|
|
|
For some sample code, check `test.foo` (extension also TBD)
|