slang - is a simple compiler, based on LLVM. S language is planned to be a clone of c, with some extra features.
HUGE NOTE - the compiler is in deep development, though it works, there are a lot of unsupported features, that would be implemented later.
In order to build the project, you need to have LLVM installed and set its binaries in $PATH. After installing dependencies run
make
to build the compiler, or
make tests
to build the tests.
slang [filename]
generates result.o, object file that can be linked with gcc.
func fib(n: i32): i32 {
if n <= 2 ret 1;
ret fib(n - 1) + fib(n - 2);
}
- func definition
- branching
- let, ret keywords
- int types
- float types
- bool types
- structs
- interfaces
- string support
- type deduction
- pointer and array type support
- lots of more...