Skip to content

Repository files navigation

bolehlang

A dynamically typed, interpreted programming language inspired by Malaysian English (Manglish). Build by 🇲🇾 for 🇲🇾.

eh "Hello World! Apa khabar?";

Documentation

Full language reference and tutorials live in docs/:

Topic Doc
Install & prerequisites Installation
Run your first program, CLI Getting started
VS Code syntax highlighting VS Code extension
Variables, types, literals Variables and types
Arithmetic, comparison, logic Operators
is it / or is it / abuden Control flow
one by one, sampai, dalam, break/continue Loops
jom, nah, closures Functions
try see, alamak, mampus Error handling
Built-ins (len, apa_ni, …) Built-in functions
tapau imports Imports
Keyword ↔ meaning cheat sheet Keyword reference
Walkthrough examples Examples walkthrough

Quick start

This Project requries Go.

git clone https://github.com/kooixh/bolehlang.git
cd bolehlang
./install.sh          # installs `boleh` to /usr/local/bin
boleh examples/hello.boleh

See Getting started for boleh CLI flags and more samples. Extra programs are under examples/.

Features (overview)

Manglish-style keywords (dei, jom, eh, abuden, …), lexical scoping, first-class functions and closures, arrays, try/catch/finally-style errors, tapau imports, and built-ins for types, conversion, and randomness. Details are in the docs linked above.

Project layout

bolehlang/
├── main.go              # CLI entry
├── lexer/               # Grammar and Syntax
├── parser/              # AST
├── interpreter/         # Evaluator + builtins functions
├── vscode/              # VS Code extension package
├── examples/            # Sample .boleh files
└── docs/                # Language documentation
└── tests/                # Tests

Architecture

Classic pipeline: lexerparser (recursive descent + precedence climbing) → tree-walking interpreter with environment chains for scope; control flow for loops/returns uses bounded panic/recover patterns inside the interpreter.

Contributing

Issues and pull requests are welcome—language ideas, builtins, examples, or doc fixes.

License

MIT

About

The Malaysian Programming Language

Resources

Stars

23 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages