Documentation
¶
Index ¶
- type FileGenerator
- type FileOutput
- type Generator
- type TypeInfo
- type TypeNamer
- func (n *TypeNamer) GenerateUnionTypeName(union *vscodemetamodel.OrType) (string, error)
- func (n *TypeNamer) GetDependencyGraph() map[string][]string
- func (n *TypeNamer) GetDocumentation(typeName string) string
- func (n *TypeNamer) GetTypeInfo(t interface{}) (TypeInfo, error)
- func (n *TypeNamer) GetTypeInfoFromRaw(t interface{}) (TypeInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileGenerator ¶
type FileGenerator struct {
// contains filtered or unexported fields
}
FileGenerator handles generating Go files
func NewFileGenerator ¶
func NewFileGenerator(model *vscodemetamodel.MetaModel) *FileGenerator
NewFileGenerator creates a new file generator
func (*FileGenerator) GenerateFiles ¶
func (g *FileGenerator) GenerateFiles(ctx context.Context, packageName string) ([]FileOutput, error)
GenerateFiles generates all Go files for the types
type FileOutput ¶
type FileOutput struct { Path string // Relative path to write the file Contents string // File contents }
FileOutput represents a generated file
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator handles the generation of LSP protocol code
func NewGenerator ¶
func NewGenerator(model *vscodemetamodel.MetaModel) *Generator
NewGenerator creates a new LSP protocol code generator
func (*Generator) GenerateUnionType ¶
func (g *Generator) GenerateUnionType(ctx context.Context, union *vscodemetamodel.OrType) (string, error)
GenerateUnionType generates a Go type for a union type
type TypeInfo ¶
type TypeInfo struct { Name string // The Go type name GoType string // The actual Go type (e.g., string, int, etc.) IsPointer bool // Whether this is a pointer type IsBuiltin bool // Whether this is a builtin type IsNullable bool // Whether this type can be null IsUnion bool // Whether this is a union type Documentation string // Documentation for this type Dependencies []string // Names of other types this type depends on IsRecursive bool // Whether this type references itself }
TypeInfo represents information about a type in our system
type TypeNamer ¶
type TypeNamer struct {
// contains filtered or unexported fields
}
TypeNamer handles type naming in our system
func (*TypeNamer) GenerateUnionTypeName ¶
func (n *TypeNamer) GenerateUnionTypeName(union *vscodemetamodel.OrType) (string, error)
GenerateUnionTypeName generates a name for a union type based on its members
func (*TypeNamer) GetDependencyGraph ¶
GetDependencyGraph returns a map of type names to their dependencies
func (*TypeNamer) GetDocumentation ¶
GetDocumentation returns the documentation for a type
func (*TypeNamer) GetTypeInfo ¶
GetTypeInfo returns type information for a given type
func (*TypeNamer) GetTypeInfoFromRaw ¶
GetTypeInfoFromRaw gets or creates type info from a raw interface{} value