Skip to content

A goofy imperative yet multiparadigm language made with LLVM and C++

License

Notifications You must be signed in to change notification settings

SSS-Says-Snek/chunglang

Repository files navigation

Chunglang /ˈtʃʌŋleɪŋg/

A goofy compiled language made with LLVM and C++.

Static Badge GitHub License GitHub repo size GitHub last commit

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.

Proposed Features

  • Pattern matching
  • Algebraic data types (including quotients!)
  • Garbage collection
  • Default immutability
  • Generics
  • Modules
  • Multiparadigm (supporting FP and OOP)

Example

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.

Install

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

Build from Source (Only linux-verified)

  1. Clone git repository
git clone https://github.com/SSS-Says-Snek/chunglang
  1. Download LLVM and Clang from your favorite package manager
  2. Compile the Chunglang CLI
cmake -S . -B build
cmake --build build
  1. The CLI is now available at ./build/chung

Use

Compile the test program

./chung parse test.chung

The resulting binary should be located in ./chungbuild/ and should be named output.out.

About

A goofy imperative yet multiparadigm language made with LLVM and C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published