In this version, a simple support for function definition and call is provided. Functions can have multiple inputs and one output. Input and output can be either of int, float, char, bool.
Now we have two basic functions: int to cast something to int and assert to do an assertion on a basic comparison in the form on a = b. If assertion fails, the application aborts.
Support for + and - as a prefix to numbers, and <<, >> operators for bit shifting is also added.
You can also explicitly specify a binding type: x:int := 10.
You can run x.sh to execute all unit tests.
Usage:
- Compile your source code:
./dot input_file.dot - Execute output:
./input_file