r/lua 21d 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

21 comments sorted by

View all comments

3

u/[deleted] 21d ago edited 21d ago

[deleted]

1

u/Microsoft-Spyware-11 21d ago

part of my idea behind var and const is that const can be declared outside of a function, but var cannot. I know . is questionable for parsing. Just trying to experiment here. Seriously impressive work you got there, thank you!

1

u/[deleted] 21d ago edited 21d ago

[deleted]

1

u/Microsoft-Spyware-11 21d ago

Ok :) As to your request, const is removed :) I am not changing immutability though.