hinglang
v0.3.0
Published
HingLang - A Hinglish + English programming language
Maintainers
Readme
HingLang 🚀
HingLang is a simple toy programming language that uses Hinglish + English syntax to make coding fun and easy for beginners.
It demonstrates how programming languages work internally using a custom interpreter written in C.
📦 Installation
Install globally to use the command:
npm install -g hinglang
▶️ Usage
Run a HingLang file:
hinglang file.hing
🧪 Example Programs
1. Print Output
You can use print or likho:
print 10 likho 10
2. Arithmetic (BODMAS + Parentheses)
print 2 + 3 * 4 print (2 + 3) * 4
3. Variables
x = 10 y = 5 print x + y
4. Negative Numbers
print -5 print -(2 + 3)
5. If Condition
You can use if or agar:
x = 10 agar x > 5 print x
6. If-Else (Same line or next line)
You can use else or anyatha:
x = 3 agar x > 5 print x anyatha print 0
x = 3 agar x > 5 print x anyatha print 0
7. Comparison Operators
Supported operators:
< == >= <= !=
Example:
x = 10 agar x >= 10 print 1 agar x != 5 print 2
✨ Features
- Hinglish + English syntax
- Beginner-friendly design
- Variables and arithmetic expressions
- BODMAS with parentheses support
- Negative numbers support
- Conditional statements (if/agar, else/anyatha)
- Comparison operators: > < == >= <= !=
- Lightweight interpreter written in C
⚠️ Limitations
- Only integer values supported
- No loops yet
- No string handling
- One statement per line
- Variable names should contain only alphabets
🧠 How it Works
HingLang reads a .hing file line by line, parses expressions, evaluates conditions, and executes commands using a custom-built interpreter.
👤 Author
Jagmeet Singh
📄 License
ISC
