symboltable

package
v0.0.0-...-3974014 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 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 {
	// contains filtered or unexported fields
}

SymbolTable keeps info about the symbols that were found during the parser.

func New

func New() *SymbolTable

New creates a new SymbolTable.

func (*SymbolTable) Add

func (st *SymbolTable) Add(name string) int

Add adds a symbol into the table. Returns -1 if already exists.

func (*SymbolTable) Index

func (st *SymbolTable) Index(name string) int

Index returns the index of a symbol. Returns -1 if not exists.

Jump to

Keyboard shortcuts

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