Documentation
¶
Index ¶
- Variables
- type ArrayType
- type Binary
- type BuiltIn
- type CallExpression
- type CompositeLit
- type Ellipsis
- type FuncLit
- type FuncParam
- type FuncParams
- type FuncType
- type Index
- type IntVal
- type InterfaceFunctionDecl
- type InterfaceFunctionDecls
- type InterfaceType
- type KeyValue
- type Paren
- type Selector
- type Star
- type StringVal
- type StructField
- type StructFields
- type StructType
- type Type
- type TypeAssert
- type Types
- type Unary
- type VariableVal
Constants ¶
This section is empty.
Variables ¶
View Source
var Blank = VariableVal("_")
View Source
var Nil = VariableVal("nil")
Functions ¶
This section is empty.
Types ¶
type CallExpression ¶
func NewCallExpression ¶
func NewCallExpression(function astgen.ASTExpr, args ...astgen.ASTExpr) *CallExpression
func NewCallFunction ¶
func NewCallFunction(receiver, function string, args ...astgen.ASTExpr) *CallExpression
func (*CallExpression) ASTExpr ¶
func (c *CallExpression) ASTExpr() ast.Expr
type CompositeLit ¶
func NewCompositeLit ¶
func NewCompositeLit(typ astgen.ASTExpr, elems ...astgen.ASTExpr) *CompositeLit
func (*CompositeLit) ASTExpr ¶
func (c *CompositeLit) ASTExpr() ast.Expr
type FuncParams ¶
type FuncParams []*FuncParam
func (FuncParams) ToFieldList ¶
func (f FuncParams) ToFieldList() *ast.FieldList
type FuncType ¶
type FuncType struct { Params FuncParams ReturnTypes Types }
type Index ¶
Index represents accessing an array or map by index, e.g. `myMap["myKey"]` or `myArr[0]`
type InterfaceFunctionDecl ¶
type InterfaceFunctionDecl struct { Name string Params FuncParams ReturnTypes Types Comment string }
func (*InterfaceFunctionDecl) ToASTField ¶
func (i *InterfaceFunctionDecl) ToASTField() *ast.Field
type InterfaceFunctionDecls ¶
type InterfaceFunctionDecls []*InterfaceFunctionDecl
func (InterfaceFunctionDecls) ToFieldList ¶
func (i InterfaceFunctionDecls) ToFieldList() *ast.FieldList
type InterfaceType ¶
type InterfaceType struct {
Functions InterfaceFunctionDecls
}
func NewInterfaceType ¶
func NewInterfaceType(functions ...*InterfaceFunctionDecl) *InterfaceType
func (*InterfaceType) ASTExpr ¶
func (i *InterfaceType) ASTExpr() ast.Expr
type StructField ¶
func (*StructField) ToASTField ¶
func (f *StructField) ToASTField() *ast.Field
type StructFields ¶
type StructFields []*StructField
func (StructFields) ToFieldList ¶
func (s StructFields) ToFieldList() *ast.FieldList
type StructType ¶
type StructType struct {
Fields StructFields
}
func NewStructType ¶
func NewStructType(fields ...*StructField) *StructType
func (*StructType) ASTExpr ¶
func (s *StructType) ASTExpr() ast.Expr
type Type ¶
type Type string
type TypeAssert ¶
func NewTypeAssert ¶
func NewTypeAssert(receiver astgen.ASTExpr, typ astgen.ASTExpr) *TypeAssert
func (*TypeAssert) ASTExpr ¶
func (t *TypeAssert) ASTExpr() ast.Expr
type VariableVal ¶
type VariableVal string
func (VariableVal) ASTExpr ¶
func (v VariableVal) ASTExpr() ast.Expr
Click to show internal directories.
Click to hide internal directories.