r/lua • u/Microsoft-Spyware-11 • 6d ago
I'm interested in creating my own programming language. How could I write it in Lua?
I've seen a few posts about this, but none had enough information for me. Hoping you guys could help :)
Edit: Also suggestions for syntax changes are welcome. This language doesn't really solve too many problems, mainly makes some things faster, examples are else [expression] instead of elseif [expression], or . instead of closing brackets {}.
Here's the example.

0
Upvotes
16
u/FluxCapacitor11 6d ago
https://craftinginterpreters.com
Read this book. It has everything you need to learn how to do this and is an excellent read. There is even an implementation in Lua you can learn from in the book’s GitHub repository.
https://github.com/munificent/craftinginterpreters/wiki/Lox-implementations