Skip to main content

LoveLang - A Hinglish-based programming language

Project description

❤️ LoveLang

Python
License: MIT
Contributions Welcome
GitHub stars
GitHub forks

LoveLang is a fun, Hinglish-based toy programming language written in Python.
It is inspired by BhaiLang but created with its own flavor of pyaar (love) ❤️.

  • Hinglish keywords (bolo, suno, agartum, nehito…)
  • Easy to run (pure Python, no external dependencies)
  • Great for learning how interpreters work
  • Open to community contributions ✨

🚀 Quick Start

1. Clone the repo

git clone https://github.com/CodeGoura/lovelang.git
cd lovelang

2. Run a LoveLang file

python lovelang.py examples/hello.pyr

3. File extension

All LoveLang files use .pyr.


📝 Syntax Keywords

LoveLang Keyword Meaning (English)
suno input
bolo print
agartum if
nehito else
jabtak while
thodaroko continue
miltehe break
trust pass
dilse function definition
lautjao return
lovetrue true
lovefalse false

💡 Example Programs

Hello World

bolo("Hello doston, Welcome to LoveLang ❤️");

Input / Output

naam = suno("Apna naam batao: ");
bolo("Hi", naam, "- nice to meet you!");

Conditionals

x = 10;
agartum (x > 5) {
    bolo("x bada hai");
} nehito {
    bolo("x chhota hai");
}

Loops

i = 0;
jabtak (i < 5) {
    i = i + 1;
    agartum (i == 3) { thodaroko; }
    bolo("Count:", i);
    agartum (i == 4) { miltehe; }
}

Functions

dilse add(a, b) {
    lautjao a + b;
}
bolo("2 + 3 =", add(2, 3));

⚡ Error Handling

  • Syntax Errors: Show line + column with caret pointer.
  • Runtime Errors:
    • Undefined variable
    • Division by zero
    • Argument count mismatch
    • Function not found

Example:

bolo(x);   # RuntimeError: Undefined variable 'x'

📂 Project Structure

lovelang/
│── lovelang.py       # Interpreter
│── examples/         # Sample .pyr programs
│── docs/             # Syntax & grammar docs
│── README.md         # This file

🤝 How to Contribute

LoveLang is open source and we welcome your contributions!

  1. Fork this repo
  2. Clone your fork:
    git clone https://github.com/your-username/lovelang.git
    cd lovelang
    
  3. Create a feature branch:
    git checkout -b feature-new-keyword
    
  4. Add your changes (new Hinglish keywords, syntax, bug fixes, docs…)
  5. Commit and push:
    git commit -m "Add new keyword: dilkaro"
    git push origin feature-new-keyword
    
  6. Open a Pull Request 🎉

📌 Roadmap

  • Add for-loops (maybe jabtaklove?)
  • Add lists/arrays support
  • Build an interactive REPL (python lovelang.py without file)
  • More built-in string functions
  • Error messages with suggestions ("Did you mean nehito?")
  • Community-driven Hinglish keywords ❤️

👤 Author

Gourahari (CodeGoura)


📜 License

This project is open source under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lovelang-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lovelang-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file lovelang-0.1.0.tar.gz.

File metadata

  • Download URL: lovelang-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lovelang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ccedb2beed0ecae941b70108fe7af114b55f5b209afe33818f55a44afdf5b42
MD5 1baa41d338e27329ad543198755f8782
BLAKE2b-256 0c2e655ab2a940bf56910b2a245b9f65ef188402075bcb32169e712476c99ce8

See more details on using hashes here.

File details

Details for the file lovelang-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lovelang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for lovelang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfd9e34fd189210e8e54668de893db4b27583fcb1500e97be0a3227a76105b74
MD5 25958dc9c5a5e7161c88f92d22439357
BLAKE2b-256 3df7676954b3f063702bfcd56c033d08bd5a28dcd15eb7a62853bced8a6b30cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page