internal

package
v0.0.0-...-04cea23 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GLOBAL_SCOPE = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Symbol

type Symbol struct {
	Scope int8
	Name  string
	Value value.Value
}

type SymbolTable

type SymbolTable struct {
	Symbols *single.LinkedList[*Symbol]
	Scope   int8
}

func NewSymbolTable

func NewSymbolTable() *SymbolTable

func (*SymbolTable) AddSymbol

func (t *SymbolTable) AddSymbol(name string, value value.Value) error

func (*SymbolTable) EnterScope

func (s *SymbolTable) EnterScope()

func (*SymbolTable) ExitScope

func (t *SymbolTable) ExitScope()

func (*SymbolTable) GetSymbol

func (t *SymbolTable) GetSymbol(name string) (*Symbol, bool)

func (SymbolTable) String

func (t SymbolTable) String() string

Jump to

Keyboard shortcuts

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