|
|
|
@ -7,10 +7,13 @@ Is is meant to "just work", without adding unnecessary and bloated language feat
|
|
|
|
|
|
|
|
|
|
Basic algorithms like the fibonacci sequence should compile fine. More sophisticated programs will not work yet. See [TODO](./TODO) for a roadmap. |
|
|
|
|
|
|
|
|
|
The Sabre compiler emits JavaScript, until the language has matured sufficiently. Backends for WASM, C, x86 and ARM are planned. |
|
|
|
|
|
|
|
|
|
## Examples |
|
|
|
|
|
|
|
|
|
```rs |
|
|
|
|
// examples/fib.sb |
|
|
|
|
|
|
|
|
|
main :: () { |
|
|
|
|
let num = 10 |
|
|
|
|
return fib(num) |
|
|
|
@ -23,6 +26,8 @@ fib :: (n) {
|
|
|
|
|
|
|
|
|
|
return fib(n-1) + fib(n-2) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -> 55 |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## License |
|
|
|
|