Package trans

import "github.com/BurntSushi/gop/trans"
Overview
Index

Overview ▾

Index ▾

func Translate(fset *token.FileSet, files []*ast.File) error
type AType
    func (t AType) String() string
type Array
    func (t Array) String() string
type Bool
    func (_ Bool) String() string
type Byte
    func (_ Byte) String() string
type Chan
    func (t Chan) String() string
type ChanDir
type Complex128
    func (_ Complex128) String() string
type Complex64
    func (_ Complex64) String() string
type Float32
    func (_ Float32) String() string
type Float64
    func (_ Float64) String() string
type Func
    func (t Func) String() string
type Int
    func (_ Int) String() string
type Int16
    func (_ Int16) String() string
type Int32
    func (_ Int32) String() string
type Int64
    func (_ Int64) String() string
type Int8
    func (_ Int8) String() string
type Interface
    func (_ Interface) String() string
type Map
    func (t Map) String() string
type Primitive
    func (t Primitive) String() string
type Ptr
    func (t Ptr) String() string
type Rune
    func (_ Rune) String() string
type Slice
    func (t Slice) String() string
type String
    func (_ String) String() string
type Struct
    func (t Struct) String() string
type Type
type Tyvar
    func (t Tyvar) String() string
type Uint
    func (_ Uint) String() string
type Uint16
    func (_ Uint16) String() string
type Uint32
    func (_ Uint32) String() string
type Uint64
    func (_ Uint64) String() string
type Uint8
    func (_ Uint8) String() string

Package files

scope.go translate.go typecheck.go types.go walk.go

func Translate

func Translate(fset *token.FileSet, files []*ast.File) error

type AType

type AType string

func (AType) String

func (t AType) String() string

type Array

type Array struct {
    Of  Type
    Len int
}

func (Array) String

func (t Array) String() string

type Bool

type Bool struct{}

func (Bool) String

func (_ Bool) String() string

type Byte

type Byte struct{}

func (Byte) String

func (_ Byte) String() string

type Chan

type Chan struct {
    Of  Type
    Dir ChanDir
}

func (Chan) String

func (t Chan) String() string

type ChanDir

type ChanDir int
const (
    ChanDirBi ChanDir = iota
    ChanDirSend
    ChanDirRecv
)

type Complex128

type Complex128 struct{}

func (Complex128) String

func (_ Complex128) String() string

type Complex64

type Complex64 struct{}

func (Complex64) String

func (_ Complex64) String() string

type Float32

type Float32 struct{}

func (Float32) String

func (_ Float32) String() string

type Float64

type Float64 struct{}

func (Float64) String

func (_ Float64) String() string

type Func

type Func struct {
    In  []Type
    Out []Type
}

func (Func) String

func (t Func) String() string

type Int

type Int struct{}

func (Int) String

func (_ Int) String() string

type Int16

type Int16 struct{}

func (Int16) String

func (_ Int16) String() string

type Int32

type Int32 struct{}

func (Int32) String

func (_ Int32) String() string

type Int64

type Int64 struct{}

func (Int64) String

func (_ Int64) String() string

type Int8

type Int8 struct{}

func (Int8) String

func (_ Int8) String() string

type Interface

type Interface struct{}

TODO(burntsushi): deal with interfaces

func (Interface) String

func (_ Interface) String() string

type Map

type Map struct {
    Key Type
    Val Type
}

func (Map) String

func (t Map) String() string

type Primitive

type Primitive string

func (Primitive) String

func (t Primitive) String() string

type Ptr

type Ptr struct {
    To Type
}

func (Ptr) String

func (t Ptr) String() string

type Rune

type Rune struct{}

func (Rune) String

func (_ Rune) String() string

type Slice

type Slice struct {
    Of Type
}

func (Slice) String

func (t Slice) String() string

type String

type String struct{}

func (String) String

func (_ String) String() string

type Struct

type Struct struct {
    Members []struct {
        Name string
        Of   Type
    }
}

func (Struct) String

func (t Struct) String() string

type Type

type Type interface {
    String() string
}

type Tyvar

type Tyvar string

func (Tyvar) String

func (t Tyvar) String() string

type Uint

type Uint struct{}

func (Uint) String

func (_ Uint) String() string

type Uint16

type Uint16 struct{}

func (Uint16) String

func (_ Uint16) String() string

type Uint32

type Uint32 struct{}

func (Uint32) String

func (_ Uint32) String() string

type Uint64

type Uint64 struct{}

func (Uint64) String

func (_ Uint64) String() string

type Uint8

type Uint8 struct{}

func (Uint8) String

func (_ Uint8) String() string