Skip to content
On this page

Get Started

Quick Start

  1. Install requirements


    To compile a joelang program, you'll need

    RequirementVersionVerify via
    Node.js & NPM18.xnode -v and npm -v
    clang3.26.4clang --version
    llvm14.0.6llvm-config --version or llvm-config-14 --version
    gcc12.2.0gcc --version
    curl -sL | sudo bash
    sudo apt install -y nodejs clang llvm-14 gcc
    brew install node llvm@14 gcc
    # Install Chocolatey package manager
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(''))
    choco install nodejs mingw
    choco install llvm --version=14.0.6
    • Download binary


      When downloading a binary file, you can rename it to joec which is what code snippets in the documentation use.

    • Or clone the repo, then npm i to install dependencies.


      When cloning and running locally, joec in the code snippets can be replaced with npm run joec or ./.bin/joec


Compile a .joe file

joec main.joe # compile
./main # run

Read from stdin

Reading input from stdin will compile and run your code without saving a binary file to disk.

joec -i 'f main { print 42 }'
Advanced Usage

Advanced usage is available behind flags.

# debug mode on
joec [filename].joe -d
joec -i '...' -d

# stop after lexing, do not parse; will output the Tokens
# (that's the lowercase L, not the number 1)
joec ... -l

# stop after parsing, do not analyze; will output the Parse Tree
joec ... -p

# stop after analysis; do not compile; will output the AST and Symbol Table
joec ... -a [--json]

# run the tests
npm test


When running Joelang with npm run joec, remember to separate the flags with --.

npm run joec [filename.joe] -- <flags>

Included Examples

See the examples directory