r/Compilers • u/Hopeful-Ad-1665 • 3d ago
I built FoxVC: A lightweight custom scripting language with its own runtime and web studio [Open Source]
Hey everyone 👋
I'm excited to share a project I've been working on—FoxVC 🦊. It's a lightweight, custom scripting language I built from the ground up with its runtime and a web studio. It’s source. I just released it today.
The goal was simple: create a easy-to-learn scripting language that removes clutter like semicolons, colons and too much boilerplate. I wanted something that feels intuitive to use and gives you a smooth local development experience right away.
⚡ Syntax Preview
# 1. Structured function definition act getForce(mass, accel) emit mass * accel
2. State & execution
m = 450 a = 15 f = getForce(m, a)
say "Net Force:" say f
3. Clean condition branching (no colons, no brackets)
pick f > 5000 say "Status: High thrust threshold reached!" otherwise say "Status: Nominal thrust output."
🛠️ Architecture & Under the Hood
- Lexer & AST Parser: Built custom with language features—mold blueprints, pulse loops, lock constants, guard and trap for error handling.
- Flat & Clean Scoping: Uses Python-style indentation, no colons, no semicolons. Clean readable code.
- Interactive Web Studio: Comes with a browser-based playground that runs locally on localhost:8080. No setup needed.
- Zero-Toolchain Setup: Just run./install.sh on Linux/macOS or install.bat on Windows. Instant access.
📦 Source & Getting Started
FoxVC is open source under the MIT License.
👉 GitHub Repository: https://github.com/AnayUpadhyay-all/FoxVC
This is a public release so I’d love your feedback on:
- The choice of words like act emit, pick and mold compared to traditional keywords, like function, return, if, etc.
- How the AST parsing and statement handling works under the hood.
- What features should come next in the engine.
Any thoughts, suggestions or issues are welcome. I'm still. Growing with this project and your input means a lot.
---
🛠️ Update (Wave 1 Fixes Pushed!):
Thanks to everyone who pointed out edge cases in the comments!
Bug 3.2 Fixed:** `trap` error handling no longer swallows `emit` (return), `halt` (break), or `skip` (continue) signals.
Syntax expanded:** Both `recover` and `otherwise` are now valid catch keywords.
- Added automated test harness verifying control signals pass cleanly.
Code & commits live on GitHub: https://github.com/AnayUpadhyay-all/FoxVC