Words
Thoughts on code, music, and everything in between.
Making a Programming Language
A step-by-step guide to building your own programming language in TypeScript — covering lexing, parsing, evaluation, variables, math, arrays, and more.
May 18, 2026#typescript#compilers
Making a Language: The Lexer
Building the lexer for Spark — turning source code into tokens with line/column tracking, comments, and escape sequences.
May 18, 2026#typescript#compilers
Making a Language: The Parser
Building a recursive descent parser with precedence climbing for Spark's expressions, statements, and control flow.
May 18, 2026#typescript#compilers
Making a Language: The Evaluator
Building Spark's evaluator — environments, closures, operator overloading, return signals, and error reporting.
May 18, 2026#typescript#compilers
Making a Language: Using Spark
Tying everything together — the run function, complete Spark examples, and exercises for extending the language.
May 18, 2026#typescript#compilers