Documentation ¶
Index ¶
Constants ¶
View Source
const ( IntegerSymbol = "INTEGER" BooleanSymbol = "BOOLEAN" StringSymbol = "STRING" FunctionSymbol = "FUNCTION" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boolean ¶
type Boolean struct {
Name *ast.Identifier
}
Represent Boolean Object
func (*Boolean) Type ¶
func (b *Boolean) Type() SymbolType
type Function ¶
Represent Function symbol Name represents function's name. Scope represents function value's scope.
func (*Function) Type ¶
func (f *Function) Type() SymbolType
type Integer ¶
type Integer struct {
Name *ast.Identifier
}
Represent Integer symbol
func (*Integer) Type ¶
func (i *Integer) Type() SymbolType
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope represent a variable's scope.
func NewEnclosedScope ¶
NewEnclosedScope makes a new scope which has outer scope.
func (*Scope) AppendInner ¶
func (*Scope) Get ¶
Getter return's variable's scope. If a scope doesn't have a variable, Program will search in outer scope.
type String ¶
type String struct {
Name *ast.Identifier
}
Represent String Object
func (*String) Type ¶
func (s *String) Type() SymbolType
type Symbol ¶
type Symbol interface { Type() SymbolType String() string }
type SymbolType ¶
type SymbolType string
Click to show internal directories.
Click to hide internal directories.