Empowering Ethiopian developers to build world-class software using Amharic.
# HASAB Programming Language
A statically-typed, compiled programming language with dual-script (Latin + Amharic/Ethiopic) support. Compiles to JVM bytecode via Java source generation.
---
## Quick Start
```bash
# Build the compiler
./gradlew shadowJar
# Create a new project
java -jar build/libs/hasab-lang-1.0.0.jar new my-app
cd my-app
# Build and run
hasab build
hasab run
```
---
## Language Features
| Feature | Example |
|---------|---------|
| Functions | `fn add(x: int, y: int) -> int { return x + y; }` |
| Variables | `let x = 42;` / `let mut y = 10;` |
| Structs | `struct Point { x: int, y: int }` |
| Enums | `enum Color { Red, Green, Blue }` |
| Arrays | `let nums = [1, 2, 3];` |
| Impl blocks | `impl Point { fn len(self) -> int { ... } }` |
| Optionals | `let name: string? = nil;` |
| Modules | `mod geometry { pub struct Point { ... } }` |
### Amharic (Ethiopic) Support
All major keywords have Amharic equivalents. Code can be written entirely in Amharic:
```hasab
ተግባር ዋና() {
ይሁን ስም = "HASAB"፤
ከሆነ ስም != ባዶ {
ጻፍ(ሰላምታ(ስም))፤
}
}
```
### Ethiopic Semicolons
`፤` (U+1364) is supported as a statement terminator alongside `;`:
```hasab
let x = 1;
ይሁን y = 2፤
println(x);
ጻፍ(y)፤
```
---
## Keyword Reference
| Latin | Amharic | Alt | Purpose |
|-------|---------|-----|---------|
| `fn` | `ተግባር` | | Function declaration |
| `let` | `ይሁን` | `ለ` | Variable binding |
| `mut` | `ተለዋዋጭ` | | Mutable modifier |
| `if` | `ከሆነ` | | Conditional |
| `else` | `ካልሆነ` | | Alternative branch |
| `while` | `እስከሆነ` | | Loop |
| `for` | `አምልኮ` | | Iteration |
| `return` | `ተመለስ` | | Return value |
| `break` | `አቋርጥ` | | Exit loop |
| `continue` | `ቀጥል` | | Skip iteration |
| `true` | `እውነት` | | Boolean true |
| `false` | `ሐሰት` | | Boolean false |
| `nil` | `ባዶ` | | Null value |
| `struct` | `መዋቅር` | | Struct declaration |
| `enum` | `ዝርዝርአይነት` | | Enum declaration |
| `trait` | `ባህሪ` | | Trait declaration |
| `pub` | `ይፋ` | | Public visibility |
| `use` | `ተጠቀም` | | Impo …