mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
25 lines
462 B
Lua
25 lines
462 B
Lua
-- Simple Lua module with a greeting function
|
|
|
|
-- Person class definition
|
|
local Person = {}
|
|
Person.__index = Person
|
|
|
|
function Person.new(name)
|
|
local self = setmetatable({}, Person)
|
|
self.name = name
|
|
return self
|
|
end
|
|
|
|
-- Main greeting function to be detected by ctags
|
|
function greet(person)
|
|
return "Hello, " .. person.name .. "!"
|
|
end
|
|
|
|
-- Example usage
|
|
local p = Person.new("World")
|
|
print(greet(p))
|
|
|
|
return {
|
|
Person = Person,
|
|
greet = greet
|
|
}
|