Documentation
¶
Index ¶
- type Generator
- func (g *Generator) AddField(name string, fieldType string, t antlr.Token) error
- func (g *Generator) AtEnd() error
- func (g *Generator) CloseOptionalScope() error
- func (g *Generator) ErrorToken(token antlr.Token, format string, params ...interface{}) error
- func (g *Generator) Generate(pkgName string, dest io.Writer) error
- func (g *Generator) HeadChar(char string, ignore, pass bool) error
- func (g *Generator) HeadString(anchor string, ignore, pass bool) error
- func (g *Generator) LookupChar(char string, lower, upper int, close, ignore, pass bool) error
- func (g *Generator) LookupFixedChar(anchor string, offset int, ignore, pass bool) error
- func (g *Generator) LookupFixedString(anchor string, offset int, ignore, pass bool) error
- func (g *Generator) LookupString(anchor string, lower, upper int, close, ignore, pass bool) error
- func (g *Generator) OpenOptionalScope(name string, t antlr.Token) error
- func (g *Generator) PassHeadCharacters(char string) error
- func (g *Generator) PassN(n int) error
- func (g *Generator) PlatformType(t generator.PlatformType) error
- func (g *Generator) Push() error
- func (g *Generator) RegGravity(name string) error
- func (g *Generator) Relax() error
- func (g *Generator) RestLengthCheck(operator string, length int) error
- func (g *Generator) Stress() error
- func (g *Generator) TakeBeforeChar(name, fieldType, char string, meta ast.FieldMeta, lower, upper int, ...) error
- func (g *Generator) TakeBeforeString(name, fieldType, anchor string, meta ast.FieldMeta, lower, upper int, ...) error
- func (g *Generator) TakeRest(name, fieldType string, meta ast.FieldMeta) error
- func (g *Generator) UseRule(name string, t antlr.Token) error
- type Name
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator implementation of generator.Generator for Go target
func NewGenerator ¶
NewGenerator constructor
func (*Generator) CloseOptionalScope ¶
CloseOptionalScope ...
func (*Generator) ErrorToken ¶
ErrorToken message
func (*Generator) HeadString ¶
HeadString checks if the rest starts with the given string and passes it
func (*Generator) LookupChar ¶
LookupCharEx ...
func (*Generator) LookupFixedChar ¶
LookupFixedChar ...
func (*Generator) LookupFixedString ¶
LookupFixedString ...
func (*Generator) LookupString ¶
LookupString ...
func (*Generator) OpenOptionalScope ¶
OpenOptionalScope ...
func (*Generator) PassHeadCharacters ¶
func (*Generator) PassN ¶
PassN passes first N characters if they are there, otherwise signal a error
func (*Generator) PlatformType ¶
func (g *Generator) PlatformType(t generator.PlatformType) error
PlatformType holds an information what type of platform to generate code for:
- Little endiant
- Big endian
- Crossplatform
There's a difference for fast short (up to 8 bytes) prefix checks in strings.
func (*Generator) RegGravity ¶
RegGravity registers center of gravity
func (*Generator) RestLengthCheck ¶
func (*Generator) TakeBeforeChar ¶
func (g *Generator) TakeBeforeChar(name, fieldType, char string, meta ast.FieldMeta, lower, upper int, close, expand, include bool) error
TakeBeforeChar ...
func (*Generator) TakeBeforeString ¶
func (g *Generator) TakeBeforeString(name, fieldType, anchor string, meta ast.FieldMeta, lower, upper int, close, expand, include bool) error
TakeBeforeStringEx ...
Source Files
¶
Click to show internal directories.
Click to hide internal directories.