πŸš€SHASHX

Welcome to shashx

A lightweight, dynamically-typed interpreted language built for simplicity and learning.

Get Started

πŸ“– What is shashx?

shashx is a beginner-friendly, custom-designed programming language aimed at demystifying how programming languages work under the hood. It is built with simplicity and clarity in mind β€” offering clean syntax, custom logic structures, and real-time execution through an interpreter model.

Developed by Shashwat Singh, shashx serves as both a personal project and a powerful educational tool that helps aspiring developers understand the core concepts behind language design.

Whether you're a curious developer or an enthusiast interested in compiler theory, shashx opens the doors to understanding what's behind every line of code you write β€” by letting you build and run your own.

✨ Features

  • βœ… Dynamically typed – no need to declare types
  • ⚑ Interpreted – executes directly without compilation
  • 🧼 Custom clean syntax – simple and intuitive commands
  • πŸ” Loop support – flp, wlp, dlp
  • 🧠 Conditionals – if, elf, el
  • πŸ–¨οΈ Print statements with pf()
  • πŸ› οΈ Built with JavaScript (Node.js)
  • πŸ–₯️ CLI-based execution
  • πŸ’» VS Code syntax extension support

πŸ”§ Under the Hood

shashx is built from scratch using JavaScript and follows a basic interpreter pattern. Here's how it works internally:

  • πŸ“œ Lexer: Breaks your code into tokens (keywords, symbols, identifiers).
  • 🌳 Parser: Builds an Abstract Syntax Tree (AST) from tokens.
  • 🧠 Interpreter: Walks the AST and executes commands in real-time.
  • πŸ“ File Extension: Uses .sx for source code files.
  • πŸ§ͺ Minimal runtime: Everything runs via a lightweight runtime powered by Node.js.

This structure makes shashx simple, fast, and easy to extend!

πŸ“¦ Installation

Install via NPM (Recommended)

  npm install -g shashx

Run a .sx File

  shashx hello.sx

πŸ’‘ Example: hello.sx

hello.sx

  pf("Hello from shashx!");

Terminal Output

  Hello from shashx!

🧠 Syntax Guide

βž• Print Statement

pf("Hello, World!");

πŸ“¦ Variable Declaration

@x = 10
@y = 20
pf(>x)
pf(>y)

➰ For Loop (flp)

flp @i = 0 to 3 {
  pf("flp i = " > i);
}

πŸ“ Comment Line

~> This is a single-line comment

Use ~> to write single-line comments in shashx.

πŸ” 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

Add syntax highlighting for shashx in your VS Code editor!

  • πŸ”€ Syntax highlighting
  • πŸ—‚οΈ File recognition (.sx)
  • ✍️ Friendly editing experience
πŸ‘‰ Install Extension

🎨 Let's Dive

  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• 
  β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— 
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—
  β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•
  

Install it Now!! shashx

πŸ“’ Contribution

Want to improve shashx? Whether it's fixing bugs, adding new features, or improving documentation β€” every contribution counts!

  • 🍴 Fork the repository
  • πŸ› οΈ Make your changes
  • πŸ“© Open a pull request

Bug reports, feature ideas, and suggestions are always welcome. Let's build something great together!

🌟 Ready to Contribute?

Jump straight into the GitHub repository and start collaborating on the future of shashx.

πŸš€ Go to GitHub Repo

Don’t forget to ⭐ the repo if you find it useful!

πŸ“¬ Contact

Hey there! πŸ‘‹ I’m Shashwat Singh

A passionate developer, security enthusiast, and creator of the shashx language. I'm always open to interesting conversations and cool collaborations!

πŸ’» JavaScript πŸ›‘οΈ Cybersecurity 🌐 Web Dev 🧠 AI Projects πŸ› οΈ CLI Tools
"Code is not just a skill, it's a superpower πŸ’₯"