Documentation ¶
Index ¶
- Variables
- func RegisterGenerator(g Generator)
- type AssemblyScript
- func (gen *AssemblyScript) Extensions() []string
- func (*AssemblyScript) Finish(output io.Writer, buffer io.Reader) error
- func (gen *AssemblyScript) Language() string
- func (gen *AssemblyScript) Options() map[string]string
- func (gen *AssemblyScript) Start(file *kmparser.Content) (compiler Compiler, err error)
- type C
- type Compiler
- type DotNet
- type Generator
- type Golang
- type Odin
- type Swift
- type TemplateData
- type TemplateFunctions
- type Zig
Constants ¶
This section is empty.
Variables ¶
View Source
var Generators []Generator
Generators is a list of all generators available and registered by RegisterGenerator
Functions ¶
func RegisterGenerator ¶
func RegisterGenerator(g Generator)
RegisterGenerator register the given Generator. You should use it on `init` function.
Types ¶
type AssemblyScript ¶
type AssemblyScript struct {
// contains filtered or unexported fields
}
func (*AssemblyScript) Extensions ¶
func (gen *AssemblyScript) Extensions() []string
func (*AssemblyScript) Language ¶
func (gen *AssemblyScript) Language() string
func (*AssemblyScript) Options ¶
func (gen *AssemblyScript) Options() map[string]string
type Compiler ¶
func NewTemplate ¶
func NewTemplate(modules []string, funcs TemplateFunctions, pattern ...string) (compiler Compiler)
type DotNet ¶
type DotNet struct {
// contains filtered or unexported fields
}
func (*DotNet) Extensions ¶
type Generator ¶
type Generator interface { Start(file *kmparser.Content) (compiler Compiler, err error) Options() map[string]string Extensions() []string Language() string Finish(output io.Writer, buffer io.Reader) (err error) }
func AssemblyScriptGenerator ¶
func AssemblyScriptGenerator() Generator
func CGenerator ¶
func CGenerator() Generator
func DotNetGenerator ¶
func DotNetGenerator() Generator
func GolangGenerator ¶
func GolangGenerator() Generator
func OdinGenerator ¶
func OdinGenerator() Generator
func SwiftGenerator ¶
func SwiftGenerator() Generator
func ZigGenerator ¶
func ZigGenerator() Generator
type Golang ¶
type Golang struct {
// contains filtered or unexported fields
}
func (*Golang) Extensions ¶
type Odin ¶
type Odin struct {
// contains filtered or unexported fields
}
func (*Odin) Extensions ¶
type Swift ¶
type Swift struct {
// contains filtered or unexported fields
}
func (*Swift) Extensions ¶
type TemplateData ¶
type TemplateFunctions ¶
type TemplateFunctions struct { FromTags func(s string) string ToDefault func(typ kmparser.Type) string ToPlainDefault func(typ kmparser.Type) string ToType func(typ kmparser.Type) string ToPlainType func(typ kmparser.Type) string ToTypeView func(typ kmparser.Type) string ToPlainTypeView func(typ kmparser.Type) string }
func NewTemplateFunctions ¶
func NewTemplateFunctions(gen Generator, content *kmparser.Content) TemplateFunctions
Click to show internal directories.
Click to hide internal directories.