LuaScript
Library and preprocessor for object-oriented programming in the Lua programming language.
Install / Use
/learn @jotapapel/LuaScriptREADME
<img src="https://raw.githubusercontent.com/jotapapel/luascript/main/logo.svg" color="red"/> LuaScript
Library and preprocessor for object-oriented programming in the Lua programming language.
Repository <big>·</big> Documentation <big>·</big> Releases
Example lss file
/*
Multiline comment
another line,
and another
*/
// single line comment
require dir.file
enum EnumName {
Const1,
Const2,
Const3
}
final prototype PrototypeName: Prototype2, Prototype3 {
static var z: object = Class(2, 3)
var a: number = 99, b: string = "bootleg"
const c = math.pi
func d(...) {
}
}
class Class1: Superclass, Prototype2, Prototype3 {
var a: number = 99, b: string = "bootleg"
const c = {
a = 2,
b = 33
}
constructor(a: string, b: number?) {
}
static func d(a: string, b: number?, c: any) -> (string) {
try
// something
end
return "string"
}
}
Processed lua file (complete)
--[[
Multiline comment
another line,
and another
--]]
-- single line comment
require("dir/file")
EnumName = enum({
"Const1",
"Const2",
"Const3"
})
PrototypeName = prototype(true, "Prototype2", "Prototype3")({
["static-z:object"] = Class(2, 3),
["a:number"] = 99,
["b:string"] = "bootleg",
["c:constant"] = math.pi,
["d"] = function(self, ...)
end
})
Class1 = class(false, "Superclass", "Prototype2", "Prototype3")({
["a:number"] = 99,
["b:string"] = "bootleg",
["c:constant"] = {
a = 2,
b = 33
},
["constructor"] = function(self, a, b)
catch_types({"string", "number?"}, true, a, b)
end,
["static-d"] = function(self, a, b, c)
return catch_types({"string"}, false, (function(self, a, b, c)
catch_types({"string", "number?", "any"}, true, a, b, c)
try_catch(self, function(self)
-- something
end)
return "string"
end)(self, a, b, c))
end
})
Processed lua file (minimal)
require("dir/file")
EnumName = enum({
"Const1",
"Const2",
"Const3"
})
PrototypeName = prototype(true, "Prototype2", "Prototype3")({
["static-z:object"] = Class(2, 3)
["a:number"] = 99,
["b:string"] = "bootleg"
["c:constant"] = math.pi
["d"] = function(self, ...)
end
})
Class1 = class(false, "Superclass", "Prototype2", "Prototype3")({
["a:number"] = 99,
["b:string"] = "bootleg"
["c:constant"] =
a = 2,
b = 33
})
constructor(a: string, b: catch_index("number")) {
}
static func d(a: string, b: catch_index("number"), c: any) -> (string) {
try_catch(self, function(self)
end)
return "string"
}
}
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
