Very simple lisp-like interpreted scripting language written in lua, intended for use as a game command language. Originally made for 1x1.
Commands/code can look like this: fly false
..or like this: def buildplatform {loop 10 {(var i (i)|(+ 1)) (placetile (tile) (x)|(+ (i)) (y))}} tile x y width
The language is very forgiving (unless you throw an internal error; usualy users fault), it will shut up if you run a nonexisting command. (feature, not a bug...)
this_function_doesnt_exist ".. so what?"
But you can add your own handler at the bottom of the run function
You can rename the file ofc, that doesnt matter.
The entire library is in lang.lua
local lang = require "lang"Write your own function
lang.serializer = function(value,options)
-- ...
end...or use an existing library...
lang.serializer = require "inspect"make sure to remove newline characters
print(lang.run(lang.deserialize(([[
loop 10 {
(var i (i)|(+ 1))
(log (join "fox no. " (i)))
}
]]):gsub("\n", " "))))