Documentation ¶
Index ¶
- Variables
- func BasicLookup(name string) types.Type
- func FieldTypeName(args []parsing.Argument, index int) string
- func ParamName(index int) string
- func TitleString(name string) string
- func TypeName(t Type) string
- type AssignStatement
- type BasicType
- type Call
- type CallStatement
- type Chan
- type Context
- func (c *Context) Build(pfake parsing.Fake) File
- func (c *Context) BuildAssignStatement(receiver Receiver, name string, index int, args []parsing.Argument) AssignStatement
- func (c *Context) BuildBody(receiver Receiver, signature parsing.Signature) []Statement
- func (c *Context) BuildCallCount() Field
- func (c *Context) BuildCallStruct(signature parsing.Signature) Field
- func (c *Context) BuildFakeType(iface parsing.Interface) NamedType
- func (c *Context) BuildFunc(fake NamedType, signature parsing.Signature) Func
- func (c *Context) BuildIncrementStatement(receiver Receiver, name string) IncrementStatement
- func (c *Context) BuildMutex() Field
- func (c *Context) BuildMutexLockStatement(receiver Receiver, name string) CallStatement
- func (c *Context) BuildMutexUnlockStatement(receiver Receiver, name string) DeferStatement
- func (c *Context) BuildParams(args []parsing.Argument, named bool) []Param
- func (c *Context) BuildReceives(args []parsing.Argument) Field
- func (c *Context) BuildResults(args []parsing.Argument) []Result
- func (c *Context) BuildReturnStatement(receiver Receiver, signature parsing.Signature) ReturnStatement
- func (c *Context) BuildReturns(args []parsing.Argument) Field
- func (c *Context) BuildStub(signature parsing.Signature) Field
- func (c *Context) BuildStubIfStatement(receiver Receiver, signature parsing.Signature) IfStatement
- type DeferStatement
- type Equality
- type Expression
- type Field
- type File
- type Func
- type Ident
- type Identifiable
- type IfStatement
- type Import
- type IncrementStatement
- type Interface
- type Map
- type NamedType
- type Nil
- type Param
- type Pointer
- type Receiver
- type Result
- type ReturnStatement
- type Selector
- type Slice
- type Statement
- type Struct
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BasicBool = BasicLookup("bool") BasicInt = BasicLookup("int") BasicInt8 = BasicLookup("int8") BasicInt16 = BasicLookup("int16") BasicInt32 = BasicLookup("int32") BasicInt64 = BasicLookup("int64") BasicUint = BasicLookup("uint") BasicUint8 = BasicLookup("uint8") BasicUint16 = BasicLookup("uint16") BasicUint32 = BasicLookup("uint32") BasicUint64 = BasicLookup("uint64") BasicUintptr = BasicLookup("uintptr") BasicFloat32 = BasicLookup("float32") BasicFloat64 = BasicLookup("float64") BasicComplex64 = BasicLookup("complex64") BasicComplex128 = BasicLookup("complex128") BasicString = BasicLookup("string") BasicByte = BasicLookup("byte") BasicRune = BasicLookup("rune") )
Functions ¶
func BasicLookup ¶
func TitleString ¶
Types ¶
type AssignStatement ¶
type AssignStatement struct { Left Expression Right Expression }
func NewAssignStatement ¶
func NewAssignStatement(left, right Expression) AssignStatement
func (AssignStatement) Stmt ¶
func (as AssignStatement) Stmt() ast.Stmt
type Call ¶
type Call struct { X Expression Params []Param }
func NewCall ¶
func NewCall(expr Expression, params ...Param) Call
type CallStatement ¶
type CallStatement struct {
Call Call
}
func NewCallStatement ¶
func NewCallStatement(call Call) CallStatement
func (CallStatement) Stmt ¶
func (cs CallStatement) Stmt() ast.Stmt
type Context ¶
type Context struct{}
func NewContext ¶
func NewContext() *Context
func (*Context) BuildAssignStatement ¶
func (*Context) BuildCallCount ¶
func (*Context) BuildCallStruct ¶
func (*Context) BuildIncrementStatement ¶
func (c *Context) BuildIncrementStatement(receiver Receiver, name string) IncrementStatement
func (*Context) BuildMutex ¶
func (*Context) BuildMutexLockStatement ¶
func (c *Context) BuildMutexLockStatement(receiver Receiver, name string) CallStatement
func (*Context) BuildMutexUnlockStatement ¶
func (c *Context) BuildMutexUnlockStatement(receiver Receiver, name string) DeferStatement
func (*Context) BuildParams ¶
func (*Context) BuildReturnStatement ¶
func (c *Context) BuildReturnStatement(receiver Receiver, signature parsing.Signature) ReturnStatement
func (*Context) BuildStubIfStatement ¶
func (c *Context) BuildStubIfStatement(receiver Receiver, signature parsing.Signature) IfStatement
type DeferStatement ¶
type DeferStatement struct {
Call Call
}
func NewDeferStatement ¶
func NewDeferStatement(call Call) DeferStatement
func (DeferStatement) Stmt ¶
func (ds DeferStatement) Stmt() ast.Stmt
type Equality ¶
type Equality struct { Equal bool Left Expression Right Expression }
func NewEquality ¶
func NewEquality(equal bool, left, right Expression) Equality
type Expression ¶
type Identifiable ¶
type IfStatement ¶
type IfStatement struct { Condition Expression Body []Statement }
func NewIfStatement ¶
func NewIfStatement(condition Expression, body []Statement) IfStatement
func (IfStatement) Stmt ¶
func (is IfStatement) Stmt() ast.Stmt
type IncrementStatement ¶
type IncrementStatement struct {
X Expression
}
func NewIncrementStatement ¶
func NewIncrementStatement(expr Expression) IncrementStatement
func (IncrementStatement) Stmt ¶
func (is IncrementStatement) Stmt() ast.Stmt
type Receiver ¶
func NewReceiver ¶
type ReturnStatement ¶
type ReturnStatement struct {
Results []Expression
}
func NewReturnStatement ¶
func NewReturnStatement(results ...Expression) ReturnStatement
func (ReturnStatement) Stmt ¶
func (rs ReturnStatement) Stmt() ast.Stmt
type Selector ¶
type Selector struct {
Parts []Identifiable
}
func NewSelector ¶
func NewSelector(parts ...Identifiable) Selector
Source Files ¶
- assign_statement.go
- basic_type.go
- call.go
- call_statement.go
- chan.go
- context.go
- defer_statement.go
- equality.go
- expression.go
- field.go
- file.go
- func.go
- identifiable.go
- if_statement.go
- import.go
- increment_statement.go
- interface.go
- map.go
- named_type.go
- nil.go
- param.go
- pointer.go
- receiver.go
- result.go
- return_statement.go
- selector.go
- slice.go
- statement.go
- struct.go
- type.go
- util.go
Click to show internal directories.
Click to hide internal directories.