## Yard Yard is an funny programming language compiler and interpreter written in pure Rust. Its a functional language, having no concept of classes or inheritance. Types are static and must be known at compile time. ### Primitve data types The language has 4 primitive data types: * `bool` a 1 byte boolean value which is either true or false. It can also be initalised with a random value at compile time iwht `maybe` * `int` a 8 byte two's complement signed integer with 64-bit of storage space * `rat` a 8 byte IEEE-754 double precision floating point value * `str` a dynamically sized immutable string wich for now can only be used with the concatonation operator `..` NOTE: no custom data types such as structs or classes are supported. ### Keywords
Syntax | Description | Example |
despite | Inverted if. Only executes the following block if the expression is false |
|
loop | While(true)-Loop. Loops forever until either yield, ret, break are used. Loop take no boolean expression. |
|
cont | Short form for “continue”. Jumps to the next iteration of a loop |
|
break | Exits a loop immediately |
|
yield | Returns from a function with an argument as return value |
|
ret | Short form for “return”. This keyword takes no argument and returns from a function. NOTE: if ret is used in a function with a return type, an error occurs. |
|
please | Decides on runtime wether a block should be executed or not. |
|
unless | Works like a while loop except inverted. it will only run if the condition is false. |
|
goto | jumps to a specified label |
|