Module I am working on(so far only a small 140 lines of code)

Some Code
local Module = require(script.Parent)
local Language = Module:AddLanguage("Complex")

Language:ChangeHolders("{", "}")

Language:AddNewFunction("PrintLine ", function(...)
	return print(...)
end)

Language:AddNewFunction("WarnLine ", function(...)
	return warn(...)
end)

Language:AddNewFunction("ErrorLine ", function(Output, Level)
	if typeof(Level) ~= "number" then
		return error("error level has to be a number")
	end
	
	return error(Output, Level)
end)

Language:AddNewFunction("CheckType ", function(Value)
	return typeof(Value)
end)

Language:RunCode([[
    PrintLine {"test", CheckType {"test"}}
    WarnLine {"test", CheckType {"test"}}
    ErrorLine {"test", 0}
]])

I am working on a module where you can create your own language
so far you can only make new functions and you can put functions as arguments as well, this module only excepts numbers, strings, or the functions as arguments right now

anyways, I wonder what to add after I fix the current bugs
thanks for reading

3 Likes

Instead of this you can do:

assert(typeof(Level) ~= "number", "error level has to be a number")
And can I see the code for the module? It looks really cool!

1 Like

I want to fix some bugs before I make any of this open source, since adding a function as an argument only works under certain circumstances

That’s fine, I just thought I could help add some stuff. Good luck!

1 Like

so I fixed many annoying bugs and I added a lot of things, including variables and booleans

might make this open source soon

EDIT1: a bit mad at roblox for doing this to me
image
I clearly published it to save, but it isn’t even saved

pretty mad right now because I don’t feel like coding the fixes again, literally lost more then half of my code from this…

EDIT2: OMG YES
the auto save thing on studio SAVED ME, it saved everything
thank god
I was going to be sad for a moment there

I ended up making the code open source