ir

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DYNSIZE = -1

Variables

This section is empty.

Functions

func DartSizeof

func DartSizeof(t Term) int

func FillAllSize

func FillAllSize(t Term)

func GoSizeof

func GoSizeof(t Term) int

func IsDartSizeDynamic

func IsDartSizeDynamic(t Term) bool

func IsGoSizeDynamic

func IsGoSizeDynamic(t Term) bool

Types

type Array

type Array struct {
	Len  int
	Elem Term
	// contains filtered or unexported fields
}

func NewArray

func NewArray(length int) *Array

func (*Array) AddChild

func (arr *Array) AddChild(t Term)

func (*Array) GetHeader

func (h *Array) GetHeader() *termHeader

func (*Array) GetIdent

func (i *Array) GetIdent() *Ident

func (*Array) SetIdent

func (i *Array) SetIdent(ident *Ident)

func (*Array) Traverse

func (arr *Array) Traverse(visitPre, visitPost visitor)

type Basic

type Basic struct {
	TypeKind types.BasicKind `json:"-"`
	TypeInfo types.BasicInfo `json:"-"`
	TypeName string
	// contains filtered or unexported fields
}

func NewBasic

func NewBasic(typ *types.Basic) *Basic

func (*Basic) AddChild

func (b *Basic) AddChild(Term)

func (*Basic) GetHeader

func (h *Basic) GetHeader() *termHeader

func (*Basic) GetIdent

func (i *Basic) GetIdent() *Ident

func (*Basic) SetIdent

func (i *Basic) SetIdent(ident *Ident)

func (*Basic) Traverse

func (b *Basic) Traverse(visitPre, visitPost visitor)

type Chan

type Chan struct {
	Chid uint8
	Elem Term
	// contains filtered or unexported fields
}

func NewChan

func NewChan() *Chan

func (*Chan) AddChild

func (x *Chan) AddChild(t Term)

func (*Chan) GetHeader

func (h *Chan) GetHeader() *termHeader

func (*Chan) Traverse

func (x *Chan) Traverse(visitPre, visitPost visitor)

type Coerce

type Coerce struct {
	*Ident `json:"Target"`
	Elem   Term `json:"-"`
	// contains filtered or unexported fields
}

func NewCoerce

func NewCoerce(obj types.Object, uri uri.Uri) *Coerce

func (*Coerce) AddChild

func (c *Coerce) AddChild(t Term)

func (*Coerce) GetHeader

func (h *Coerce) GetHeader() *termHeader

func (*Coerce) Traverse

func (c *Coerce) Traverse(visitPre, visitPost visitor)

type Elem

type Elem = Term

type Field

type Field struct {
	Name string
	Term Term

	*FieldDirectives
	// contains filtered or unexported fields
}

func NewField

func NewField(name string, directives *FieldDirectives) *Field

func (*Field) AddChild

func (f *Field) AddChild(t Term)

func (*Field) DartName

func (f *Field) DartName() string

func (*Field) GetHeader

func (h *Field) GetHeader() *termHeader

func (*Field) Traverse

func (f *Field) Traverse(visitPre, visitPost visitor)

type FieldDirectives

type FieldDirectives struct {
	SendToDart   bool
	SendBackToGo bool
	RenameInDart string

	Broadcast        bool
	BlockUntilListen bool
	Memorized        bool
}

func ParseFieldDirectives

func ParseFieldDirectives(spec string) *FieldDirectives

type HasIdent

type HasIdent interface {
	GetIdent() *Ident
	SetIdent(*Ident)
}

type Ident

type Ident struct {
	Pkg  *types.Package `json:"-"`
	Name string         `json:"-"`
	Uri  uri.Uri
}

func NewIdent

func NewIdent(pkg *types.Package, name string, uri uri.Uri) *Ident

type Map

type Map struct {
	Key   Term
	Value Term
	// contains filtered or unexported fields
}

func NewMap

func NewMap() *Map

func (*Map) AddChild

func (m *Map) AddChild(t Term)

func (*Map) GetHeader

func (h *Map) GetHeader() *termHeader

func (*Map) GetIdent

func (i *Map) GetIdent() *Ident

func (*Map) SetIdent

func (i *Map) SetIdent(ident *Ident)

func (*Map) Traverse

func (m *Map) Traverse(visitPre, visitPost visitor)

type Optional

type Optional struct {
	Term Term
	// contains filtered or unexported fields
}

func NewOptional

func NewOptional() *Optional

func (*Optional) AddChild

func (o *Optional) AddChild(t Term)

func (*Optional) GetHeader

func (h *Optional) GetHeader() *termHeader

func (*Optional) Traverse

func (o *Optional) Traverse(visitPre, visitPost visitor)

type PinToken

type PinToken struct {
	Term Term
	// contains filtered or unexported fields
}

func NewPinToken

func NewPinToken() *PinToken

func (*PinToken) AddChild

func (x *PinToken) AddChild(t Term)

func (*PinToken) GetHeader

func (h *PinToken) GetHeader() *termHeader

func (*PinToken) Traverse

func (x *PinToken) Traverse(visitPre, visitPost visitor)

type PtrTo

type PtrTo struct {
	Elem Term
	// contains filtered or unexported fields
}

func NewPtrTo

func NewPtrTo() *PtrTo

func (*PtrTo) AddChild

func (p *PtrTo) AddChild(t Term)

func (*PtrTo) GetHeader

func (h *PtrTo) GetHeader() *termHeader

func (*PtrTo) GetIdent

func (i *PtrTo) GetIdent() *Ident

func (*PtrTo) SetIdent

func (i *PtrTo) SetIdent(ident *Ident)

func (*PtrTo) Traverse

func (p *PtrTo) Traverse(visitPre, visitPost visitor)

type Slice

type Slice struct {
	Elem Term
	// contains filtered or unexported fields
}

func NewSlice

func NewSlice() *Slice

func (*Slice) AddChild

func (s *Slice) AddChild(t Term)

func (*Slice) GetHeader

func (h *Slice) GetHeader() *termHeader

func (*Slice) GetIdent

func (i *Slice) GetIdent() *Ident

func (*Slice) SetIdent

func (i *Slice) SetIdent(ident *Ident)

func (*Slice) Traverse

func (s *Slice) Traverse(visitPre, visitPost visitor)

type Struct

type Struct struct {
	Nchans int
	Fields []*Field
	Chans  []*Field
	// contains filtered or unexported fields
}

func NewStruct

func NewStruct() *Struct

func (*Struct) AddChild

func (s *Struct) AddChild(t Term)

func (*Struct) GetHeader

func (h *Struct) GetHeader() *termHeader

func (*Struct) GetIdent

func (i *Struct) GetIdent() *Ident

func (*Struct) IsFieldNameConflicted

func (s *Struct) IsFieldNameConflicted(name string) bool

func (*Struct) SetIdent

func (i *Struct) SetIdent(ident *Ident)

func (*Struct) Traverse

func (s *Struct) Traverse(visitPre, visitPost visitor)

type Term

type Term interface {
	Traverse(visitPre, visitPost visitor)
	AddChild(Term)
	GetHeader() *termHeader
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL