JavaScript + Ohm compiler project

HexLang

A compact occult-themed language with a serious compiler pipeline.

Syntax overview

summon x = 10;
whisper(x + 5);

ritual add(a, b) {
  offer a + b;
}

omen add(2, 3) == 5 {
  whisper("bound");
}

Semantic rules

HexLang checks declaration before use, same-scope redeclaration, block scoping, function arity, duplicate parameters, offer placement, assignment targets, operators, and boolean-like conditions.

Pipeline

Source code flows through parser, analyzer, optimizer, generator, and CLI orchestration. Each stage is separately testable.

Run the CLI

npm install
npm run parse -- examples/hello.hex
npm run analyze -- examples/hello.hex
npm run run -- examples/hello.hex

Developer

Ahamad Aldousari — project developer and maintainer.