symboltable

package
v0.0.0-...-a201a34 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SymbolTable

type SymbolTable struct {
	Table map[string]int
}

func NewSymbolTable

func NewSymbolTable() SymbolTable

func (*SymbolTable) AddEntry

func (s *SymbolTable) AddEntry(symbol string, address int)

AddEntry adds the pair (symbol, address) to the table

func (SymbolTable) Contains

func (s SymbolTable) Contains(symbol string) bool

Contains check whether the symbol table contains the given symbol

func (SymbolTable) GetAddress

func (s SymbolTable) GetAddress(symbol string) int

GetAddress returns the address associated with the symbol

Jump to

Keyboard shortcuts

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