LoveLang - A Hinglish-based programming language
Project description
❤️ LoveLang
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 |
|
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!
- Fork this repo
- Clone your fork:
git clone https://github.com/your-username/lovelang.git cd lovelang
- Create a feature branch:
git checkout -b feature-new-keyword
- Add your changes (new Hinglish keywords, syntax, bug fixes, docs…)
- Commit and push:
git commit -m "Add new keyword: dilkaro" git push origin feature-new-keyword
- Open a Pull Request 🎉
📌 Roadmap
- Add for-loops (maybe
jabtaklove?) - Add lists/arrays support
- Build an interactive REPL (
python lovelang.pywithout file) - More built-in string functions
- Error messages with suggestions ("Did you mean
nehito?") - Community-driven Hinglish keywords ❤️
👤 Author
📜 License
This project is open source under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ccedb2beed0ecae941b70108fe7af114b55f5b209afe33818f55a44afdf5b42
|
|
| MD5 |
1baa41d338e27329ad543198755f8782
|
|
| BLAKE2b-256 |
0c2e655ab2a940bf56910b2a245b9f65ef188402075bcb32169e712476c99ce8
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfd9e34fd189210e8e54668de893db4b27583fcb1500e97be0a3227a76105b74
|
|
| MD5 |
25958dc9c5a5e7161c88f92d22439357
|
|
| BLAKE2b-256 |
3df7676954b3f063702bfcd56c033d08bd5a28dcd15eb7a62853bced8a6b30cf
|