I’ve written an interpreter with a fully functioning lexer and parser. I see no actual use for it, but I thought it was a cool concept. I might make a game for this, with a script editor and output, and io.
You can get the module here and view the source here. Feel free to contribute by creating pull requests.
To run, create a script, and put this in it. At the moment, it only supports variables and printing.
local luai = require(path.to.module)
luai([[
local my_var = true
print(my_var)
]])
What language is this? From the title, I thought it was a Lua code interpreter made in Roblox Luau, but it seems like it interprets JavaScript instead?
After reading the source, you should change your terminology here. A lexer separates groups of characters into language-specific tokens. A parser reads the tokens and returns an AST (Abstract Syntax Tree). An interpreter reads the AST top-down and execute what’s on the tree.