Documentation ¶
Index ¶
- func Generate(gen Generator, nodes []parser.Node) string
- type Generator
- type GeneratorLanguage
- type GoGenerator
- func (gg GoGenerator) File() string
- func (gen GoGenerator) GenHeader(stmt *parser.HeaderStmt) string
- func (gen GoGenerator) GenMarshal(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenMarshalPlain(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenReservedIds(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenSize(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenSizePlain(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenStruct(ctrDeclarations []string, stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenUnmarshal(stmt *parser.CtrStmt) string
- func (gen GoGenerator) GenUnmarshalPlain(stmt *parser.CtrStmt) string
- func (gg GoGenerator) Lang() GeneratorLanguage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator interface { File() string Lang() GeneratorLanguage GenHeader(stmt *parser.HeaderStmt) string GenStruct(ctrDeclarations []string, stmt *parser.CtrStmt) string GenReservedIds(stmt *parser.CtrStmt) string GenSize(stmt *parser.CtrStmt) string GenMarshal(stmt *parser.CtrStmt) string GenUnmarshal(stmt *parser.CtrStmt) string GenSizePlain(stmt *parser.CtrStmt) string GenMarshalPlain(stmt *parser.CtrStmt) string GenUnmarshalPlain(stmt *parser.CtrStmt) string }
func NewGenerator ¶
func NewGenerator(lang GeneratorLanguage, file string) Generator
type GeneratorLanguage ¶
type GeneratorLanguage string
const (
GenGolang GeneratorLanguage = "go"
)
func (GeneratorLanguage) String ¶
func (lang GeneratorLanguage) String() string
type GoGenerator ¶
type GoGenerator struct {
// contains filtered or unexported fields
}
func NewGoGenerator ¶
func NewGoGenerator(file string) *GoGenerator
func (GoGenerator) File ¶
func (gg GoGenerator) File() string
func (GoGenerator) GenHeader ¶
func (gen GoGenerator) GenHeader(stmt *parser.HeaderStmt) string
func (GoGenerator) GenMarshal ¶
func (gen GoGenerator) GenMarshal(stmt *parser.CtrStmt) string
func (GoGenerator) GenMarshalPlain ¶
func (gen GoGenerator) GenMarshalPlain(stmt *parser.CtrStmt) string
func (GoGenerator) GenReservedIds ¶
func (gen GoGenerator) GenReservedIds(stmt *parser.CtrStmt) string
func (GoGenerator) GenSizePlain ¶
func (gen GoGenerator) GenSizePlain(stmt *parser.CtrStmt) string
func (GoGenerator) GenStruct ¶
func (gen GoGenerator) GenStruct(ctrDeclarations []string, stmt *parser.CtrStmt) string
func (GoGenerator) GenUnmarshal ¶
func (gen GoGenerator) GenUnmarshal(stmt *parser.CtrStmt) string
func (GoGenerator) GenUnmarshalPlain ¶
func (gen GoGenerator) GenUnmarshalPlain(stmt *parser.CtrStmt) string
func (GoGenerator) Lang ¶
func (gg GoGenerator) Lang() GeneratorLanguage
Click to show internal directories.
Click to hide internal directories.