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 Constructor
- type DefaultType
- type FieldDefinition
- type Generator
- type ImplicitDefinition
- type ImplicitField
- type NamedField
- type Optional
- type ParenExpression
- type TLB
- type TlbType
- type TypeExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBitsTypes ¶ added in v1.0.1
func GenerateConstantBigInts ¶ added in v1.0.1
func GenerateConstantInts ¶ added in v1.0.1
func GenerateVarUintTypes ¶ added in v1.0.1
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 Constructor ¶
type DefaultType ¶ added in v1.0.1
type FieldDefinition ¶
type FieldDefinition struct {
Implicit *ImplicitDefinition `@@`
NamedField *NamedField `| @@`
Anon *ParenExpression `| @@`
CellRef *CellRef `| @@`
}
func (FieldDefinition) IsEmpty ¶ added in v1.0.1
func (fd FieldDefinition) IsEmpty() bool
type Generator ¶ added in v1.0.1
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶ added in v1.0.1
func NewGenerator(knownTypes map[string]DefaultType, typeName string) *Generator
func (*Generator) GenerateGolangTypes ¶ added in v1.0.1
func (*Generator) GetTlbTypes ¶ added in v1.0.1
type ImplicitDefinition ¶
type ImplicitDefinition struct {
Start string `"{"`
Implicit *ImplicitField `(@@`
Expression *TypeExpression `| @@)`
End string `"}"`
}
type ImplicitField ¶
type NamedField ¶
type NamedField struct {
Name string `@(Ident|"_")`
Sep string `":"`
Expression TypeExpression `@@`
}
type ParenExpression ¶
type ParenExpression struct {
Name TypeExpression `"(" @@ `
Parameter []TypeExpression `@@* ")"`
}
type TLB ¶
type TLB struct {
Declarations []CombinatorDeclaration `@@*`
}
type TypeExpression ¶
Click to show internal directories.
Click to hide internal directories.