Documentation
¶
Index ¶
- func GenerateBitsTypes(sizes []int) string
- func GenerateConstantBigInts(sizes []int) string
- func GenerateConstantInts(max int) string
- func GenerateVarUintTypes(max int) string
- type Anon
- type CellRef
- type Combinator
- type CombinatorDeclaration
- type CompareOperatorExpr
- type Constructor
- type CurlyExpression
- type DefaultType
- type FieldDefinition
- type File
- type Generator
- type ImplicitField
- type NamedField
- type Option
- type Optional
- type ParenExpression
- type RefInner
- type TLB
- type TlbType
- type TypeDefinition
- type TypeExpression
- type TypeRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBitsTypes ¶
func GenerateConstantBigInts ¶
func GenerateConstantInts ¶
func GenerateVarUintTypes ¶
Types ¶
type Anon ¶
type Anon struct {
Values []FieldDefinition `"[" @@* "]"`
}
type CellRef ¶
type CellRef struct {
TypeExpression TypeExpression `"^" @@`
}
type Combinator ¶
type Combinator struct { Name string `@Ident` TypeExpressions []TypeExpression `@@*` }
type CombinatorDeclaration ¶
type CombinatorDeclaration struct { Constructor Constructor `@@` FieldDefinitions []FieldDefinition `@@*` Equal string `"="` Combinator Combinator `@@` End string `";"` }
type CompareOperatorExpr ¶
type Constructor ¶
type CurlyExpression ¶
type CurlyExpression struct { CompareExpr *CompareOperatorExpr `@@` TypeDefinition *TypeDefinition `| @@` }
type DefaultType ¶
type FieldDefinition ¶
type FieldDefinition struct { Implicit *CurlyExpression `"{" @@ "}"` NamedField *NamedField `| @@` Anon *ParenExpression `| @@` CellRef *CellRef `| @@` TypeRef *TypeRef `| @@` }
func (FieldDefinition) IsEmpty ¶
func (fd FieldDefinition) IsEmpty() bool
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) GenerateGolangTypes ¶
func (*Generator) GetTlbTypes ¶
type ImplicitField ¶
type NamedField ¶
type NamedField struct { Name string `@(Ident|"_")` Sep string `":"` Expression TypeExpression `@@` }
type Option ¶
type Option func(*Generator)
func WithDefaultTypes ¶
func WithDefaultTypes(types map[string]DefaultType, replace bool) Option
type ParenExpression ¶
type ParenExpression struct { Name TypeExpression `"(" @@ ` Parameter []TypeExpression `@@* ")"` }
type TLB ¶
type TLB struct {
Declarations []CombinatorDeclaration `@@*`
}
type TypeDefinition ¶
type TypeDefinition struct { Implicit *ImplicitField `(@@` Expression *TypeExpression `| @@)` }
type TypeExpression ¶
Click to show internal directories.
Click to hide internal directories.