Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateGolangTypes ¶
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 `@@*`
}
func (Combinator) String ¶
func (c Combinator) String() string
type CombinatorDeclaration ¶
type CombinatorDeclaration struct {
Constructor Constructor `@@`
FieldDefinitions []*FieldDefinition `@@*`
Equal string `"="`
Combinator Combinator `@@`
End string `";"`
}
type Constructor ¶
type FieldDefinition ¶
type FieldDefinition struct {
Implicit *ImplicitDefinition `@@`
NamedField *NamedField `| @@`
CellRef *CellRef `| @@`
}
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 ¶
type TypeExpression struct {
Tilda string `@"~"?`
ParenExpression *ParenExpression `@@`
AnonymousConstructor *Anon `| @@`
CellRef *CellRef `| @@`
BuiltIn *string `| @BuiltIn`
NUMBER *string `| @NUMBER`
NamedRef *string `| @Ident`
}
func (TypeExpression) String ¶
func (t TypeExpression) String() string
Click to show internal directories.
Click to hide internal directories.