BrainRot Lang is an interpreted programming language I built from first principles in Go to understand what happens between source code and program execution.
The implementation follows the complete pipeline:
Source → Lexer → Parser → AST → Tree-walking Interpreter
I wrote a DFA-based lexer, recursive-descent parser, typed AST, evaluator, and scope-chain environment without using compiler frameworks. The language supports variables, loops, recursion, arrays, closures, lexical scoping, first-class functions, and compound operators. Its behaviour is validated through 19 automated test suites.
I also built and published a VS Code extension with syntax highlighting, snippets, hover documentation, and a custom file type. GitHub Actions automatically creates binaries for Windows, macOS, and Linux, while a Next.js website provides documentation and installation guides.
- [GitHub](https://github.com/Tanveer-rajpurohit/brainrot-lang)
- [Documentation](https://brainrot-lang-web.vercel.app/)
- [Case Study](https://tanveer-singh.vercel.app/work/brainrot-lang)