Documentation
¶
Index ¶
- type Binding
- type Scope
- func (scope *Scope) CreateBinding(identifier string, locator locator.Locator, typing typing.Typing) *Binding
- func (scope *Scope) CreateBindingCannotBeShadowed(identifier string, locator locator.Locator, typing typing.Typing) *Binding
- func (scope *Scope) CreateSubScope() *Scope
- func (scope *Scope) FindBinding(identifier string) *Binding
- func (scope *Scope) GetScopeIdentifier() string
- func (scope *Scope) VariableCanBeShadowed(identifier string) bool
- func (scope *Scope) VariableDeclared(identifier string) bool
- type SymbolTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct {
IsVariable bool
CanBeShadowed bool
// contains filtered or unexported fields
}
Binding reperents the location in memory of an identifier
type Scope ¶
type Scope struct {
BaseScope *Scope
// contains filtered or unexported fields
}
Scope is where variables live and can be referenced
func CreateScope ¶
CreateScope with a baseScope. If nil, it will use itself as the base scope
func (*Scope) CreateBinding ¶
func (*Scope) CreateBindingCannotBeShadowed ¶
func (scope *Scope) CreateBindingCannotBeShadowed(identifier string, locator locator.Locator, typing typing.Typing) *Binding
CreateBindingCannotBeShadowed creates a binding associated with an identifier that cannot be shadowed in descendent scopes
func (*Scope) CreateSubScope ¶
CreateSubScope using current scope as base scope
func (*Scope) FindBinding ¶
func (*Scope) GetScopeIdentifier ¶
func (*Scope) VariableCanBeShadowed ¶
func (*Scope) VariableDeclared ¶
type SymbolTable ¶
A SymbolTable is a mapping from an identifier to its binding
func (*SymbolTable) Install ¶
func (symbolTable *SymbolTable) Install(identifier string, binding *Binding)
func (*SymbolTable) Lookup ¶
func (symbolTable *SymbolTable) Lookup(identifier string) *Binding
Click to show internal directories.
Click to hide internal directories.