scope

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 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 Scope

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

type SimpleScope

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

func NewScope

func NewScope(typ Type) *SimpleScope

TODO: rename => New or NewSimple

func (*SimpleScope) ForEachSymbol

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

func (*SimpleScope) GetSymbol

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

func (*SimpleScope) PutSymbol

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

func (*SimpleScope) SetMissHandler

func (s *SimpleScope) SetMissHandler(onMiss func(name string) symbol.Symbol)

func (*SimpleScope) Type

func (s *SimpleScope) Type() Type

type Type

type Type int
const (
	Package Type = 1 << iota
	Unit
	Block
)

Jump to

Keyboard shortcuts

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