Building My Own Programming Language from Scratch: The Journey Behind LCL

I'm an independent developer working on two ambitious projects: LCL, my own programming language, and Nexus, a visual 2D game development environment.

I've always been interested in understanding how software works behind the scenes. Instead of only learning how to use existing tools, I decided to try building some of my own.

One of these projects is LCL, a programming language I'm developing from scratch using TypeScript and Node.js.

LCL — Len Code Language

LCL started as an experiment to understand how programming languages work internally. Over time, it evolved into a much larger project.

Currently, LCL includes:

  • Its own lexer and parser.
  • An Abstract Syntax Tree (AST).
  • An interpreter.
  • Variables and functions.
  • Module and import support.
  • An interactive REPL.
  • An LSP server for language tooling.
  • JSON diagnostics.
  • Automated tests.

The goal is to keep improving the language, making it more reliable, useful, and easier to work with.

Testing and Reliability

One of the most important parts of developing LCL has been testing.

In version 0.3, the project reached 846 automated test cases:

  • 844 passing.
  • 0 failing.
  • 2 skipped because of Windows symbolic-link limitations.

I also manually tested important features such as the REPL, imports, diagnostics, and communication through the Language Server Protocol.

For me, getting the features working is only part of the process. Making sure they continue working after changes is just as important.

Nexus — A Visual 2D Game Development Environment

My second project is Nexus.

Nexus is an ambitious project focused on making 2D game development more accessible through a visual development environment.

The current editor allows users to work with scenes, arrange objects, and organize elements of a game project.

My long-term vision is to expand the editor and provide more tools that help creators develop their own 2D games.

Nexus is still under development, so there are many features I want to improve and add over time.

What's Next?

Both projects have a long way to go.

For LCL, my next goals include:

  • Expanding the standard library.
  • Improving error messages and diagnostics.
  • Adding more developer tools.
  • Improving documentation and examples.

For Nexus, I want to focus on:

  • Expanding the scene editor.
  • Improving the visual development experience.
  • Adding more game development tools.
  • Improving testing and project management features.

These are future goals, not features that are already fully implemented.

What I've Learned So Far

Working on these projects has taught me a lot about software architecture, debugging, testing, and problem-solving.

Building something from scratch is challenging because you cannot always rely on existing solutions. Sometimes you have to investigate a problem, experiment with different approaches, and figure out why something isn't working.

There is still a lot to learn, but I'm excited to see how far these projects can go.

Want to Support the Projects?

If you're interested in supporting the continued development of LCL and Nexus, you can visit my DEV profile. I've included information there about both projects and how to support their development.

Thank you for reading and following my development journey!

A Question for Other Developers

Have you ever tried building your own programming language, game engine, or developer tool?

What was the most challenging part of the process?

I'd be interested in hearing about your experiences!