Wouldn’t recommend Luau for making a language but you can still use it.
Then again, anything you’d like to do.
Would be extremely simple to make a lexer with a for loop and string.gmatch
(could possibly use string patterns) instead of constantly subbing out each character.
The rest would also be simple, not sure if you did a course on bytecode or tree walk but
Bytecode might be more difficult in Luau. Why?
Bytecode might be more complex due to:
- Having linear execution
- Being stack-based
- Registers
- Jump Labels
- Stack functions
And overall having NO access to memory or memory functions/methods.
I created a lexer in Luau, if I can find it I’ll drop the source code.
Anyways, I wish you the best of luck on this. If you’re stuck, please remember to do your research and at least take a break.