symbol

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureSymbol

type CaptureSymbol struct {
	Capture    Symbol
	CaptureNdx int
	// contains filtered or unexported fields
}

func (*CaptureSymbol) Lift

func (b *CaptureSymbol) Lift()

func (*CaptureSymbol) Liftable

func (b *CaptureSymbol) Liftable() bool

func (*CaptureSymbol) Lifted

func (b *CaptureSymbol) Lifted() bool

func (*CaptureSymbol) Name

func (b *CaptureSymbol) Name() string

func (*CaptureSymbol) Pos

func (b *CaptureSymbol) Pos() token.Pos

func (*CaptureSymbol) ReadOnly added in v0.2.0

func (b *CaptureSymbol) ReadOnly() bool

func (*CaptureSymbol) SetName

func (b *CaptureSymbol) SetName(name string)

func (*CaptureSymbol) SetPos

func (b *CaptureSymbol) SetPos(pos token.Pos)

func (*CaptureSymbol) SetReadOnly added in v0.2.0

func (b *CaptureSymbol) SetReadOnly(ro bool)

type ConstSymbol added in v0.3.0

type ConstSymbol struct {
	LiteralNdx int
	// contains filtered or unexported fields
}

func (*ConstSymbol) Lift added in v0.3.0

func (b *ConstSymbol) Lift()

func (*ConstSymbol) Liftable added in v0.3.0

func (b *ConstSymbol) Liftable() bool

func (*ConstSymbol) Lifted added in v0.3.0

func (b *ConstSymbol) Lifted() bool

func (*ConstSymbol) Name added in v0.3.0

func (b *ConstSymbol) Name() string

func (*ConstSymbol) Pos added in v0.3.0

func (b *ConstSymbol) Pos() token.Pos

func (*ConstSymbol) ReadOnly added in v0.3.0

func (b *ConstSymbol) ReadOnly() bool

func (*ConstSymbol) SetName added in v0.3.0

func (b *ConstSymbol) SetName(name string)

func (*ConstSymbol) SetPos added in v0.3.0

func (b *ConstSymbol) SetPos(pos token.Pos)

func (*ConstSymbol) SetReadOnly added in v0.3.0

func (b *ConstSymbol) SetReadOnly(ro bool)

type FuncSymbol

type FuncSymbol struct {
	External bool
	IdxFunc  int
	// contains filtered or unexported fields
}

func (*FuncSymbol) Lift

func (b *FuncSymbol) Lift()

func (*FuncSymbol) Liftable

func (b *FuncSymbol) Liftable() bool

func (*FuncSymbol) Lifted

func (b *FuncSymbol) Lifted() bool

func (*FuncSymbol) Name

func (b *FuncSymbol) Name() string

func (*FuncSymbol) Pos

func (b *FuncSymbol) Pos() token.Pos

func (*FuncSymbol) ReadOnly added in v0.2.0

func (b *FuncSymbol) ReadOnly() bool

func (*FuncSymbol) SetName

func (b *FuncSymbol) SetName(name string)

func (*FuncSymbol) SetPos

func (b *FuncSymbol) SetPos(pos token.Pos)

func (*FuncSymbol) SetReadOnly added in v0.2.0

func (b *FuncSymbol) SetReadOnly(ro bool)

type GlobalVarSymbol

type GlobalVarSymbol struct {
	GlobalNdx int
	// contains filtered or unexported fields
}

func (*GlobalVarSymbol) Lift

func (b *GlobalVarSymbol) Lift()

func (*GlobalVarSymbol) Liftable

func (b *GlobalVarSymbol) Liftable() bool

func (*GlobalVarSymbol) Lifted

func (b *GlobalVarSymbol) Lifted() bool

func (*GlobalVarSymbol) Name

func (b *GlobalVarSymbol) Name() string

func (*GlobalVarSymbol) Pos

func (b *GlobalVarSymbol) Pos() token.Pos

func (*GlobalVarSymbol) ReadOnly added in v0.2.0

func (b *GlobalVarSymbol) ReadOnly() bool

func (*GlobalVarSymbol) SetName

func (b *GlobalVarSymbol) SetName(name string)

func (*GlobalVarSymbol) SetPos

func (b *GlobalVarSymbol) SetPos(pos token.Pos)

func (*GlobalVarSymbol) SetReadOnly added in v0.2.0

func (b *GlobalVarSymbol) SetReadOnly(ro bool)

type LocalVarSymbol

type LocalVarSymbol struct {
	LocalNdx int
	// contains filtered or unexported fields
}

func (*LocalVarSymbol) Lift

func (b *LocalVarSymbol) Lift()

func (*LocalVarSymbol) Liftable

func (b *LocalVarSymbol) Liftable() bool

func (*LocalVarSymbol) Lifted

func (b *LocalVarSymbol) Lifted() bool

func (*LocalVarSymbol) Name

func (b *LocalVarSymbol) Name() string

func (*LocalVarSymbol) Pos

func (b *LocalVarSymbol) Pos() token.Pos

func (*LocalVarSymbol) ReadOnly added in v0.2.0

func (b *LocalVarSymbol) ReadOnly() bool

func (*LocalVarSymbol) SetName

func (b *LocalVarSymbol) SetName(name string)

func (*LocalVarSymbol) SetPos

func (b *LocalVarSymbol) SetPos(pos token.Pos)

func (*LocalVarSymbol) SetReadOnly added in v0.2.0

func (b *LocalVarSymbol) SetReadOnly(ro bool)

type Package added in v0.3.0

type Package struct {
	Scope Scope
	// contains filtered or unexported fields
}

func (*Package) Lift added in v0.3.0

func (b *Package) Lift()

func (*Package) Liftable added in v0.3.0

func (b *Package) Liftable() bool

func (*Package) Lifted added in v0.3.0

func (b *Package) Lifted() bool

func (*Package) Name added in v0.3.0

func (b *Package) Name() string

func (*Package) Pos added in v0.3.0

func (b *Package) Pos() token.Pos

func (*Package) ReadOnly added in v0.3.0

func (b *Package) ReadOnly() bool

func (*Package) SetName added in v0.3.0

func (b *Package) SetName(name string)

func (*Package) SetPos added in v0.3.0

func (b *Package) SetPos(pos token.Pos)

func (*Package) SetReadOnly added in v0.3.0

func (b *Package) SetReadOnly(ro bool)

type ParamSymbol

type ParamSymbol struct {
	ParamNdx int
	// contains filtered or unexported fields
}

func (*ParamSymbol) Lift

func (b *ParamSymbol) Lift()

func (*ParamSymbol) Liftable

func (b *ParamSymbol) Liftable() bool

func (*ParamSymbol) Lifted

func (b *ParamSymbol) Lifted() bool

func (*ParamSymbol) Name

func (b *ParamSymbol) Name() string

func (*ParamSymbol) Pos

func (b *ParamSymbol) Pos() token.Pos

func (*ParamSymbol) ReadOnly added in v0.2.0

func (b *ParamSymbol) ReadOnly() bool

func (*ParamSymbol) SetName

func (b *ParamSymbol) SetName(name string)

func (*ParamSymbol) SetPos

func (b *ParamSymbol) SetPos(pos token.Pos)

func (*ParamSymbol) SetReadOnly added in v0.2.0

func (b *ParamSymbol) SetReadOnly(ro bool)

type Scope

type Scope interface {
	GetSymbol(name string) Symbol
	PutSymbol(l errlogger.ErrLogger, sym Symbol) bool
}

type ScopeStack

type ScopeStack struct {
	// contains filtered or unexported fields
}

func NewScopeStack

func NewScopeStack() *ScopeStack

func (*ScopeStack) Current

func (s *ScopeStack) Current() Scope

func (*ScopeStack) FindSymbol

func (s *ScopeStack) FindSymbol(name string) (Symbol, Scope)

func (*ScopeStack) Pop

func (s *ScopeStack) Pop()

func (*ScopeStack) Push

func (s *ScopeStack) Push(scope Scope)

type SimpleScope added in v0.3.0

type SimpleScope struct {
	// contains filtered or unexported fields
}

func NewScope

func NewScope() *SimpleScope

func (*SimpleScope) ForEachSymbol added in v0.3.0

func (s *SimpleScope) ForEachSymbol(fn func(sym Symbol))

func (*SimpleScope) GetSymbol added in v0.3.0

func (s *SimpleScope) GetSymbol(name string) Symbol

func (*SimpleScope) PutSymbol added in v0.3.0

func (s *SimpleScope) PutSymbol(l errlogger.ErrLogger, sym Symbol) bool

type Symbol

type Symbol interface {
	Name() string
	SetName(name string)
	Pos() token.Pos
	SetPos(pos token.Pos)
	Liftable() bool
	Lifted() bool
	Lift()
	ReadOnly() bool
	SetReadOnly(ro bool)
}

Jump to

Keyboard shortcuts

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