A goofy compiled language made with LLVM and C++.
Chunglang aims to be a high level, fast general purpose statically compiled programming language with modern syntax and programming language features.
Note
This project is still extremely experimental and is definitely subject to change.
- Pattern matching
- Algebraic data types (including quotients!)
- Garbage collection
- Default immutability
- Generics
- Modules
- Multiparadigm (supporting FP and OOP)
Examples are located in the examples/ directory. Below is a currently working example of a chunglang program:
// test.chung
func stuff(param: int64) {
print(param);
}
func aa(param: int64) -> int64 {
// Here is a comment
if (param > 2) {
stuff(3);
3
} else {
print(111 + param);
4
}
}
func main() {
aa(4);
}
The file extension for chunglang is .chung.
Currently, chunglang is not on any package manager repository. Thus,
it must be built from source. The main file to look for is src/cli.cpp, which contains Chunglang's command line
- Clone git repository
git clone https://github.com/SSS-Says-Snek/chunglang- Download LLVM and Clang from your favorite package manager
- Compile the Chunglang CLI
cmake -S . -B build
cmake --build build- The CLI is now available at
./build/chung
Compile the test program
./chung parse test.chungThe resulting binary should be located in ./chungbuild/ and should be named output.out.
