shashx
v1.0.3
Published
A beginner-friendly interpreted programming language built for learning and fun π
Maintainers
Readme
π What is shashx?
shashx is a custom-designed, educational programming language developed by Shashwat Singh, focusing on simplicity, clean syntax, and powerful learning potential.
- π€ Inspired by modern scripting languages
- π§ Created to understand how interpreters, tokenizers, and parsers work
- π§ͺ Perfect for experimenting with language design
β¨ Features
- β Dynamically typed
- β Interpreted (no compilation needed)
- β Custom clean syntax
- β Supports variables, loops, conditionals, and print statements
- β Built with JavaScript (Node.js)
- β CLI-based execution
- β VS Code syntax highlighting extension
π¦ Installation
1. Install via NPM (Recommended)
npm install -g shashxThis will globally install the
shashxCLI.
π How to Run a .sx File
- Create a file with the
.sxextension, e.g.,hello.sx - Run it using the CLI:
shashx path/to/hello.sxπ§ Syntax Guide
β Print Statement
pf("Hello, World!")π¦ Variable Declaration
@x = 10
@y = 20
pf(>x)
pf(>y)π Loops
β° For Loop (flp)
flp @i = 0 to 3{
pf("flp i = " >i);
}π While Loop (wlp)
@j = 0;
wlp j < 2 {
pf("wlp j = " > j);
j = j + 1;
}π Do-While Loop (dlp)
@k = 0;
dlp {
pf("dlp k = " > k);
k = k + 1;
} wlp k < 2;π Conditional Statements
@x = 10
if x > 5
pf("Greater than 5")
elf x == 5
pf("Equals 5")
el
pf("Less than 5")π§© VS Code Extension Support
Want syntax highlighting in Visual Studio Code?
π Install from Marketplace
You can get the extension here:
π shashx-lang on Visual Studio Marketplace
π¨ Features
- Syntax highlighting
- File recognition (
.sx) - Friendly editing experience
π Project Structure
shashx-lang/
βββ bin/
β βββ shashx.bat # CLI batch file
βββ examples/
β βββ loop.sx # Sample code files
βββ src/
β βββ lexer.js
β βββ parser.js
β βββ interpreter.js
βββ main.js # Entry point
βββ package.json
βββ README.mdπ’ Contribution
Want to improve shashx?
- π΄ Fork the repo
- π οΈ Make changes
- π© Open a PR
Bug reports, ideas, and suggestions are always welcome!
π¬ Contact
Have questions, ideas, or feedback?
Shashwat Singh
π§ Email: [email protected]
π GitHub: github.com/shashwat-singh-01
π LinkedIn: linkedin.com/in/shashwat-singh-200495248
π License
This project is licensed under the MIT License. See the LICENSE file for details.
