Logo Lanfrica

ZekriDev1/Darija-Programming-Language

Domain:

natural language processing

Record type:

software
Creator:
Zek
Host:
# πŸ‡²πŸ‡¦ DarijaLang **DarijaLang** is a custom programming language that allows you to write code using Moroccan Darija keywords. It maps Darija terms directly to their Python equivalents, providing a fun and culturally resonant way for Moroccans to explore programming. The project includes both a **Python-based interpreter** and a **VS Code extension** for syntax highlighting and a better developer experience. --- ## πŸš€ Features - **Darija Keywords**: Use terms like `3rf` (def), `weri` (print), and `ila` (if) to write your logic. - **Easy Execution**: Run any `.darija` file directly using the Python interpreter. - **VS Code Support**: Custom extension with syntax highlighting, auto-indentation, and a dedicated language icon. - **Informative Errors**: Error messages are translated into Darija contexts (e.g., `Smiya ma m3rofach` for NameError). - **Full Python Power**: Since it's built on Python, you have access to lists, integers, functions, and more. --- ## πŸ› οΈ Getting Started ### 1. Requirements Ensure you have **Python 3.x** installed on your system. ### 2. File Structure - `darijalang.py`: The interpreter. - `sintax.txt`: Contains keyword mappings. - `main.daria`: Your Darija source code. - `darijalang-extension/`: VS Code extension folder. ### 3. Run a Program To execute a DarijaLang file: ```powershell python darijalang.py main.daria ``` --- ## πŸ“ Syntax Reference ### Control Flow | Darija | Python | Description | | :--- | :--- | :--- | | `ila` | `if` | If statement | | `awla ila` | `elif` | Else-if statement | | `awla` | `else` | Else statement | | `3la` | `for` | For loop | | `htta` | `while` | While loop | | `hbs` | `break` | Break loop | | `kml` | `continue` | Continue loop | ### Functions & Classes | Darija | Python | Description | | :--- | :--- | :--- | | `3rf` | `def` | Define function | | `rj3` | `return` | Return statement | | `class` | `class` | Define class | | `bda` | `__init__` | Constructor | | `rassi` | `self` | Class instance ( …