Documentation
¶
Index ¶
- func GenerateBitsTypes(sizes []int) string
- func GenerateConstantBigInts(sizes []int) string
- func GenerateConstantBigUints(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 ¶ added in v1.0.1
func GenerateConstantBigInts ¶ added in v1.0.1
func GenerateConstantBigUints ¶ added in v1.16.4
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 CompareOperatorExpr ¶ added in v1.4.0
type Constructor ¶
type CurlyExpression ¶ added in v1.4.0
type CurlyExpression struct {
CompareExpr *CompareOperatorExpr `@@`
TypeDefinition *TypeDefinition `| @@`
}
type DefaultType ¶ added in v1.0.1
type FieldDefinition ¶
type FieldDefinition struct {
Implicit *CurlyExpression `"{" @@ "}"`
NamedField *NamedField `| @@`
Anon *ParenExpression `| @@`
CellRef *CellRef `| @@`
TypeRef *TypeRef `| @@`
}
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 (*Generator) GenerateGolangTypes ¶ added in v1.0.1
func (*Generator) GetTlbTypes ¶ added in v1.0.1
type ImplicitField ¶
type NamedField ¶
type NamedField struct {
Name string `@(Ident|"_")`
Sep string `":"`
Expression TypeExpression `@@`
}
type Option ¶ added in v1.5.0
type Option func(*Generator)
func WithDefaultTypes ¶ added in v1.5.0
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 ¶ added in v1.4.0
type TypeDefinition struct {
Implicit *ImplicitField `(@@`
Expression *TypeExpression `| @@)`
}
type TypeExpression ¶
Click to show internal directories.
Click to hide internal directories.