Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer: scans Go source files and extracts Lua module definitions
func (*Analyzer) GenerateModuleStub ¶
GenerateModuleStub: generates a Lua annotation stub for a single module. This is the recommended format for per-module files in a library/ directory.
func (*Analyzer) GenerateStubs ¶
GenerateStubs: generates Lua annotation stubs for all discovered modules
func (*Analyzer) GetModules ¶
GetModules: returns a map of module names to module definitions
func (*Analyzer) ModuleCount ¶
ModuleCount: returns the number of modules discovered
func (*Analyzer) ScanDirectory ¶
ScanDirectory: recursively scans a directory for Go files and extracts Lua module metadata. It parses comment annotations like @luamodule, @luafunc, @luaparam, @luareturn.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator: combines function stub generation (from annotations) and type stub generation (from TypeRegistry). This provides a simple API for modules to generate complete Lua stubs.
func (*Generator) GenerateModule ¶
GenerateModule: generates complete Lua stubs for a module (functions + types merged into one file). Returns the combined stub content or an error.
func (*Generator) ProcessTypes ¶
ProcessTypes: processes all registered types to discover dependencies
func (*Generator) RegisterType ¶
RegisterType: registers a Go type for Lua stub generation
func (*Generator) ScanDirectory ¶
ScanDirectory: scans a directory for Go files with @luafunc annotations
type LuaFunction ¶
type LuaFunction struct {
Name string
Description string
Params []*LuaParam
Returns []*LuaReturn
CustomAnnotations []string // Function-level custom annotations
}
LuaFunction: represents a Lua function exported by a module
type LuaModule ¶
type LuaModule struct {
Name string
Functions []*LuaFunction
CustomAnnotations []string // Module-level custom annotations
}
LuaModule: represents a discovered Lua module