symbols

package
v0.0.0-...-d69f115 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VariableSymbol = "variables"
	FunctionSymbol = "functions"
	DataTypeSymbol = "datatypes"
)

Variables

Functions

This section is empty.

Types

type SymbolDef

type SymbolDef struct {
	Pos     string           `json:"pos"`
	Name    string           `json:"name"`
	Package string           `json:"package"`
	Def     gotypes.DataType `json:"def"`
	Block   int              `json:"block"`
}

func (*SymbolDef) UnmarshalJSON

func (o *SymbolDef) UnmarshalJSON(b []byte) error

type SymbolLookable

type SymbolLookable interface {
	LookupVariable(key string) (*SymbolDef, error)
	LookupVariableLikeSymbol(key string) (*SymbolDef, SymbolType, error)
	LookupFunction(key string) (*SymbolDef, error)
	LookupDataType(key string) (*SymbolDef, error)
	LookupMethod(datatype, methodName string) (*SymbolDef, error)
	LookupAllMethods(datatype string) (map[string]*SymbolDef, error)
	Lookup(key string) (*SymbolDef, SymbolType, error)
	Exists(name string) bool
}

type SymbolTable

type SymbolTable interface {
	SymbolLookable
	AddVariable(sym *SymbolDef) error
	AddDataType(sym *SymbolDef) error
	AddFunction(sym *SymbolDef) error
}

type SymbolType

type SymbolType string

func (SymbolType) IsDataType

func (s SymbolType) IsDataType() bool

func (SymbolType) IsFunctionType

func (s SymbolType) IsFunctionType() bool

func (SymbolType) IsVariable

func (s SymbolType) IsVariable() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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