Files
wehub-resource-sync d88fd01084
CI / test (3.10) (push) Failing after 1s
CI / test (3.12) (push) Failing after 0s
CI / skillgen-check (push) Failing after 0s
CI / security-scan (push) Failing after 0s
chore: import upstream snapshot with attribution
2026-07-13 12:09:14 +08:00

36 lines
664 B
Lua

-- Luau sample (Roblox): typed Lua superset.
-- tree-sitter-lua doesn't parse the type annotations, but extracts
-- function declarations and call edges fine.
local Server = {}
Server.__index = Server
type ServerConfig = {
port: number,
name: string?,
}
function Server.new(config: ServerConfig): Server
local self = setmetatable({}, Server)
self.port = config.port
self.name = config.name or "default"
return self
end
function Server:start(): ()
print(string.format("listening on :%d", self.port))
end
function Server:stop(): ()
print("stopped")
end
local function main()
local s = Server.new({ port = 8080 })
s:start()
end
main()
return Server