Simple Type-Annotated Programming Language
Inspired by & started as LLVM Kaleidoscope tutorial implementation here.
Prerequisites:
- C++ compiler with C++20 support
- CMake 3.19+
- Boost
- LLVM 16+
$ mkdir build
$ cd build
$ cmake -G 'Ninja' ..
$ ninja
$ ctest
The compiled binary is saved to build/bin/staplc
.
Note: syntax is subject to change as stapl is in early stage of development.
module fibonacci
def fib(n: int): int {
if n <= 1 {
return n
} else {
return fib(n - 1) + fib(n - 2)
}
}
- Efficient type checking
- Support for statements: #1
- Standard library
- libc interop
- More types (arrays, strings, structs, ...)
- Compiler optimizations