Documentation ¶
Index ¶
- Constants
- type AssignmentNode
- func (assignment *AssignmentNode) Eval(scope *Scope) SmalltalkObjectInterface
- func (a *AssignmentNode) GetValue() ValueNodeInterface
- func (a *AssignmentNode) GetVariable() *VariableNode
- func (a *AssignmentNode) GetVariables() []string
- func (a *AssignmentNode) IsAssignment() bool
- func (a *AssignmentNode) SetPosition(position int64)
- func (a *AssignmentNode) SetValue(value ValueNodeInterface)
- func (a *AssignmentNode) SetVariable(variable *VariableNode)
- type BlockNode
- func (block *BlockNode) Eval(scope *Scope) SmalltalkObjectInterface
- func (m *BlockNode) GetBody() *SequenceNode
- func (m *BlockNode) GetVariables() []string
- func (m *BlockNode) SetArguments(arguments []*VariableNode)
- func (m *BlockNode) SetBar(bar int64)
- func (m *BlockNode) SetBody(body *SequenceNode)
- func (m *BlockNode) SetColons(colons []int64)
- func (m *BlockNode) SetLeft(left int64)
- func (m *BlockNode) SetRight(right int64)
- type CascadeNode
- type Deferred
- type Interval
- type LiteralArrayNode
- type LiteralNode
- type LiteralNodeInterface
- type LiteralValueNode
- type MessageNode
- func (message *MessageNode) Eval(scope *Scope) SmalltalkObjectInterface
- func (m *MessageNode) GetArguments() []ValueNodeInterface
- func (m *MessageNode) GetReceiver() ValueNodeInterface
- func (m *MessageNode) GetSelector() string
- func (m *MessageNode) GetSelectorParts() []scanner.ValueTokenInterface
- func (m *MessageNode) GetVariables() []string
- func (n *MessageNode) IsMessage() bool
- func (m *MessageNode) SetArguments(arguments []ValueNodeInterface)
- func (m *MessageNode) SetReceiver(receiver ValueNodeInterface)
- func (m *MessageNode) SetReceiverSelectorPartsArguments(receiver ValueNodeInterface, selectorParts []scanner.ValueTokenInterface, ...)
- type Node
- func (n *Node) Eval(scope *Scope) SmalltalkObjectInterface
- func (n *Node) GetLastValue() SmalltalkObjectInterface
- func (n *Node) GetParent() ProgramNodeInterface
- func (n *Node) IsAssignment() bool
- func (l *Node) IsLiteralArray() bool
- func (n *Node) IsLiteralNode() bool
- func (n *Node) IsMessage() bool
- func (n *Node) SetLastValue(value SmalltalkObjectInterface)
- func (n *Node) SetParent(nodeInterface ProgramNodeInterface)
- func (n *Node) TypeOfNode() string
- type NodeWithRreceiverInterface
- type ProgramNodeInterface
- type Scope
- func (s *Scope) FindValueByName(name string) (SmalltalkObjectInterface, bool)
- func (s *Scope) GetVarValue(name string) (SmalltalkObjectInterface, error)
- func (s *Scope) Initialize() *Scope
- func (s *Scope) SetBoolVar(name string, value bool) *SmalltalkBoolean
- func (s *Scope) SetNumberVar(name string, value float64) *SmalltalkNumber
- func (s *Scope) SetStringVar(name string, value string) *SmalltalkString
- func (s *Scope) SetVar(name string, value SmalltalkObjectInterface) SmalltalkObjectInterface
- type SequenceNode
- func (sequence *SequenceNode) Eval(scope *Scope) SmalltalkObjectInterface
- func (m *SequenceNode) GetStatements() []ProgramNodeInterface
- func (m *SequenceNode) GetTemporaries() []*VariableNode
- func (m *SequenceNode) GetVariables() []string
- func (m *SequenceNode) SetLeftBar(leftBar int64)
- func (m *SequenceNode) SetPeriods(periods []int64)
- func (m *SequenceNode) SetRightBar(rightBar int64)
- func (m *SequenceNode) SetStatements(statements []ProgramNodeInterface)
- func (m *SequenceNode) SetTemporaries(temporaries []*VariableNode)
- func (n *SequenceNode) TypeOfNode() string
- type SmalltalkArray
- func (a *SmalltalkArray) GetValue() ([]interface{}, error)
- func (a *SmalltalkArray) GetValueAt(index int64) SmalltalkObjectInterface
- func (a *SmalltalkArray) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
- func (a *SmalltalkArray) TypeOf() string
- func (a *SmalltalkArray) Value() SmalltalkObjectInterface
- type SmalltalkBlock
- type SmalltalkBoolean
- func (b *SmalltalkBoolean) GetValue() bool
- func (b *SmalltalkBoolean) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
- func (b *SmalltalkBoolean) SetValue(val bool) *SmalltalkBoolean
- func (b *SmalltalkBoolean) TypeOf() string
- func (b *SmalltalkBoolean) Value() SmalltalkObjectInterface
- type SmalltalkNumber
- func (n *SmalltalkNumber) GetValue() float64
- func (n *SmalltalkNumber) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
- func (n *SmalltalkNumber) SetValue(val float64) *SmalltalkNumber
- func (n *SmalltalkNumber) TypeOf() string
- func (n *SmalltalkNumber) Value() SmalltalkObjectInterface
- type SmalltalkObject
- type SmalltalkObjectInterface
- type SmalltalkString
- type SmalltalkUndefinedObject
- type ValueNode
- type ValueNodeInterface
- type VariableNode
Constants ¶
View Source
const ( NUMBER_OBJ = "NUMBER" BOOLEAN_OBJ = "BOOLEAN" STRING_OBJ = "STRING" BLOCK_OBJ = "BLOCK" DEFERRED = "DEFERRED" ARRAY_OBJ = "ARRAY" UNDEFINED_OBJ = "UNDEFINED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentNode ¶
type AssignmentNode struct { *ValueNode // contains filtered or unexported fields }
func NewAssignmentNode ¶
func NewAssignmentNode() *AssignmentNode
func (*AssignmentNode) Eval ¶
func (assignment *AssignmentNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*AssignmentNode) GetValue ¶
func (a *AssignmentNode) GetValue() ValueNodeInterface
func (*AssignmentNode) GetVariable ¶
func (a *AssignmentNode) GetVariable() *VariableNode
func (*AssignmentNode) GetVariables ¶
func (a *AssignmentNode) GetVariables() []string
func (*AssignmentNode) IsAssignment ¶
func (a *AssignmentNode) IsAssignment() bool
func (*AssignmentNode) SetPosition ¶
func (a *AssignmentNode) SetPosition(position int64)
func (*AssignmentNode) SetValue ¶
func (a *AssignmentNode) SetValue(value ValueNodeInterface)
func (*AssignmentNode) SetVariable ¶
func (a *AssignmentNode) SetVariable(variable *VariableNode)
type BlockNode ¶
type BlockNode struct { *ValueNode // contains filtered or unexported fields }
func NewBlockNode ¶
func NewBlockNode() *BlockNode
func (*BlockNode) Eval ¶
func (block *BlockNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*BlockNode) GetBody ¶
func (m *BlockNode) GetBody() *SequenceNode
func (*BlockNode) GetVariables ¶
func (*BlockNode) SetArguments ¶
func (m *BlockNode) SetArguments(arguments []*VariableNode)
func (*BlockNode) SetBody ¶
func (m *BlockNode) SetBody(body *SequenceNode)
type CascadeNode ¶
type CascadeNode struct { *ValueNode // contains filtered or unexported fields }
func NewCascadeNode ¶
func NewCascadeNode() *CascadeNode
func (*CascadeNode) GetReceiver ¶
func (c *CascadeNode) GetReceiver() ValueNodeInterface
func (*CascadeNode) GetVariables ¶
func (m *CascadeNode) GetVariables() []string
func (*CascadeNode) SetMessages ¶
func (m *CascadeNode) SetMessages(messages []*MessageNode)
func (*CascadeNode) SetSemicolons ¶
func (m *CascadeNode) SetSemicolons(semicolons []int64)
type LiteralArrayNode ¶
type LiteralArrayNode struct { *LiteralNode // contains filtered or unexported fields }
func (*LiteralArrayNode) Eval ¶
func (array *LiteralArrayNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*LiteralArrayNode) GetValue ¶
func (l *LiteralArrayNode) GetValue() string
func (*LiteralArrayNode) GetVariables ¶
func (m *LiteralArrayNode) GetVariables() []string
func (*LiteralArrayNode) IsLiteralArray ¶
func (l *LiteralArrayNode) IsLiteralArray() bool
type LiteralNode ¶
type LiteralNode struct {
*ValueNode
}
func NewLiteralNode ¶
func NewLiteralNode() *LiteralNode
func (*LiteralNode) IsLiteralNode ¶
func (l *LiteralNode) IsLiteralNode() bool
func (*LiteralNode) LiteralToken ¶
func (l *LiteralNode) LiteralToken(token scanner.LiteralTokenInterface) LiteralNodeInterface
type LiteralNodeInterface ¶
type LiteralNodeInterface interface { ValueNodeInterface LiteralToken(token scanner.LiteralTokenInterface) LiteralNodeInterface GetValue() string }
func CreateLiteralArrayNode ¶
func CreateLiteralArrayNode(startPosition int64, stopPosition int64, contents []LiteralNodeInterface) LiteralNodeInterface
type LiteralValueNode ¶
type LiteralValueNode struct { *LiteralNode // contains filtered or unexported fields }
func (*LiteralValueNode) Eval ¶
func (literalValue *LiteralValueNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*LiteralValueNode) GetTypeOfToken ¶
func (literalValue *LiteralValueNode) GetTypeOfToken() string
func (*LiteralValueNode) GetValue ¶
func (literalValue *LiteralValueNode) GetValue() string
func (*LiteralValueNode) GetVariables ¶
func (l *LiteralValueNode) GetVariables() []string
type MessageNode ¶
type MessageNode struct { *ValueNode // contains filtered or unexported fields }
func NewMessageNode ¶
func NewMessageNode() *MessageNode
func (*MessageNode) Eval ¶
func (message *MessageNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*MessageNode) GetArguments ¶
func (m *MessageNode) GetArguments() []ValueNodeInterface
func (*MessageNode) GetReceiver ¶
func (m *MessageNode) GetReceiver() ValueNodeInterface
func (*MessageNode) GetSelector ¶
func (m *MessageNode) GetSelector() string
func (*MessageNode) GetSelectorParts ¶
func (m *MessageNode) GetSelectorParts() []scanner.ValueTokenInterface
func (*MessageNode) GetVariables ¶
func (m *MessageNode) GetVariables() []string
func (*MessageNode) IsMessage ¶
func (n *MessageNode) IsMessage() bool
func (*MessageNode) SetArguments ¶
func (m *MessageNode) SetArguments(arguments []ValueNodeInterface)
func (*MessageNode) SetReceiver ¶
func (m *MessageNode) SetReceiver(receiver ValueNodeInterface)
func (*MessageNode) SetReceiverSelectorPartsArguments ¶
func (m *MessageNode) SetReceiverSelectorPartsArguments(receiver ValueNodeInterface, selectorParts []scanner.ValueTokenInterface, arguments []ValueNodeInterface)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) Eval ¶
func (n *Node) Eval(scope *Scope) SmalltalkObjectInterface
func (*Node) GetLastValue ¶
func (n *Node) GetLastValue() SmalltalkObjectInterface
func (*Node) GetParent ¶
func (n *Node) GetParent() ProgramNodeInterface
func (*Node) IsAssignment ¶
func (*Node) IsLiteralArray ¶
func (*Node) IsLiteralNode ¶
func (*Node) SetLastValue ¶
func (n *Node) SetLastValue(value SmalltalkObjectInterface)
func (*Node) SetParent ¶
func (n *Node) SetParent(nodeInterface ProgramNodeInterface)
func (*Node) TypeOfNode ¶
type NodeWithRreceiverInterface ¶
type NodeWithRreceiverInterface interface {
GetReceiver() ValueNodeInterface
}
type ProgramNodeInterface ¶
type ProgramNodeInterface interface { TypeOfNode() string SetParent(nodeInterface ProgramNodeInterface) GetParent() ProgramNodeInterface IsMessage() bool IsLiteralNode() bool IsLiteralArray() bool IsAssignment() bool Eval(scope *Scope) SmalltalkObjectInterface GetLastValue() SmalltalkObjectInterface SetLastValue(SmalltalkObjectInterface) GetVariables() []string }
type Scope ¶
type Scope struct { OuterScope *Scope // contains filtered or unexported fields }
func (*Scope) FindValueByName ¶
func (s *Scope) FindValueByName(name string) (SmalltalkObjectInterface, bool)
func (*Scope) GetVarValue ¶
func (s *Scope) GetVarValue(name string) (SmalltalkObjectInterface, error)
func (*Scope) Initialize ¶
func (*Scope) SetBoolVar ¶
func (s *Scope) SetBoolVar(name string, value bool) *SmalltalkBoolean
func (*Scope) SetNumberVar ¶
func (s *Scope) SetNumberVar(name string, value float64) *SmalltalkNumber
func (*Scope) SetStringVar ¶
func (s *Scope) SetStringVar(name string, value string) *SmalltalkString
func (*Scope) SetVar ¶
func (s *Scope) SetVar(name string, value SmalltalkObjectInterface) SmalltalkObjectInterface
type SequenceNode ¶
type SequenceNode struct { *Node // contains filtered or unexported fields }
func NewSequenceNode ¶
func NewSequenceNode() *SequenceNode
func (*SequenceNode) Eval ¶
func (sequence *SequenceNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*SequenceNode) GetStatements ¶
func (m *SequenceNode) GetStatements() []ProgramNodeInterface
func (*SequenceNode) GetTemporaries ¶
func (m *SequenceNode) GetTemporaries() []*VariableNode
func (*SequenceNode) GetVariables ¶
func (m *SequenceNode) GetVariables() []string
func (*SequenceNode) SetLeftBar ¶
func (m *SequenceNode) SetLeftBar(leftBar int64)
func (*SequenceNode) SetPeriods ¶
func (m *SequenceNode) SetPeriods(periods []int64)
func (*SequenceNode) SetRightBar ¶
func (m *SequenceNode) SetRightBar(rightBar int64)
func (*SequenceNode) SetStatements ¶
func (m *SequenceNode) SetStatements(statements []ProgramNodeInterface)
func (*SequenceNode) SetTemporaries ¶
func (m *SequenceNode) SetTemporaries(temporaries []*VariableNode)
func (*SequenceNode) TypeOfNode ¶
func (n *SequenceNode) TypeOfNode() string
type SmalltalkArray ¶
type SmalltalkArray struct { SmalltalkObject // contains filtered or unexported fields }
func (*SmalltalkArray) GetValue ¶
func (a *SmalltalkArray) GetValue() ([]interface{}, error)
func (*SmalltalkArray) GetValueAt ¶
func (a *SmalltalkArray) GetValueAt(index int64) SmalltalkObjectInterface
func (*SmalltalkArray) Perform ¶
func (a *SmalltalkArray) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
func (*SmalltalkArray) TypeOf ¶
func (a *SmalltalkArray) TypeOf() string
func (*SmalltalkArray) Value ¶
func (a *SmalltalkArray) Value() SmalltalkObjectInterface
type SmalltalkBlock ¶
type SmalltalkBlock struct { *SmalltalkObject // contains filtered or unexported fields }
func (*SmalltalkBlock) Perform ¶
func (b *SmalltalkBlock) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
func (*SmalltalkBlock) TypeOf ¶
func (b *SmalltalkBlock) TypeOf() string
func (*SmalltalkBlock) Value ¶
func (b *SmalltalkBlock) Value() SmalltalkObjectInterface
type SmalltalkBoolean ¶
type SmalltalkBoolean struct { *SmalltalkObject // contains filtered or unexported fields }
func NewSmalltalkBoolean ¶
func NewSmalltalkBoolean(value bool) *SmalltalkBoolean
func (*SmalltalkBoolean) GetValue ¶
func (b *SmalltalkBoolean) GetValue() bool
func (*SmalltalkBoolean) Perform ¶
func (b *SmalltalkBoolean) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
func (*SmalltalkBoolean) SetValue ¶
func (b *SmalltalkBoolean) SetValue(val bool) *SmalltalkBoolean
func (*SmalltalkBoolean) TypeOf ¶
func (b *SmalltalkBoolean) TypeOf() string
func (*SmalltalkBoolean) Value ¶
func (b *SmalltalkBoolean) Value() SmalltalkObjectInterface
type SmalltalkNumber ¶
type SmalltalkNumber struct { *SmalltalkObject // contains filtered or unexported fields }
func NewSmalltalkNumber ¶
func NewSmalltalkNumber(value float64) *SmalltalkNumber
func (*SmalltalkNumber) GetValue ¶
func (n *SmalltalkNumber) GetValue() float64
func (*SmalltalkNumber) Perform ¶
func (n *SmalltalkNumber) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
func (*SmalltalkNumber) SetValue ¶
func (n *SmalltalkNumber) SetValue(val float64) *SmalltalkNumber
func (*SmalltalkNumber) TypeOf ¶
func (n *SmalltalkNumber) TypeOf() string
func (*SmalltalkNumber) Value ¶
func (n *SmalltalkNumber) Value() SmalltalkObjectInterface
type SmalltalkObject ¶
type SmalltalkObject struct { }
func (*SmalltalkObject) Perform ¶
func (obj *SmalltalkObject) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
type SmalltalkObjectInterface ¶
type SmalltalkObjectInterface interface { TypeOf() string Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error) Value() SmalltalkObjectInterface }
func Call ¶
func Call(receiver SmalltalkObjectInterface, m map[string]interface{}, name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func ValueAt ¶
func ValueAt(receiver *SmalltalkArray, index *SmalltalkNumber) SmalltalkObjectInterface
Array methods
type SmalltalkString ¶
type SmalltalkString struct { *SmalltalkObject // contains filtered or unexported fields }
func NewSmalltalkString ¶
func NewSmalltalkString(value string) *SmalltalkString
func (*SmalltalkString) GetValue ¶
func (s *SmalltalkString) GetValue() string
func (*SmalltalkString) SetValue ¶
func (s *SmalltalkString) SetValue(val string) *SmalltalkString
func (*SmalltalkString) TypeOf ¶
func (s *SmalltalkString) TypeOf() string
func (*SmalltalkString) Value ¶
func (s *SmalltalkString) Value() SmalltalkObjectInterface
type SmalltalkUndefinedObject ¶
type SmalltalkUndefinedObject struct {
*SmalltalkObject
}
func NewSmalltalkUndefinedObject ¶
func NewSmalltalkUndefinedObject() *SmalltalkUndefinedObject
func (*SmalltalkUndefinedObject) Perform ¶
func (n *SmalltalkUndefinedObject) Perform(name string, params []SmalltalkObjectInterface) (SmalltalkObjectInterface, error)
func (*SmalltalkUndefinedObject) TypeOf ¶
func (n *SmalltalkUndefinedObject) TypeOf() string
func (*SmalltalkUndefinedObject) Value ¶
func (n *SmalltalkUndefinedObject) Value() SmalltalkObjectInterface
type ValueNode ¶
type ValueNode struct { *Node // contains filtered or unexported fields }
func NewValueNode ¶
func NewValueNode() *ValueNode
func (*ValueNode) AddParenthesis ¶
type ValueNodeInterface ¶
type ValueNodeInterface interface { ProgramNodeInterface AddParenthesis(interval Interval) }
type VariableNode ¶
type VariableNode struct { *ValueNode Token scanner.ValueTokenInterface }
func (*VariableNode) Eval ¶
func (variable *VariableNode) Eval(scope *Scope) SmalltalkObjectInterface
func (*VariableNode) GetName ¶
func (v *VariableNode) GetName() string
func (*VariableNode) GetVariables ¶
func (m *VariableNode) GetVariables() []string
Click to show internal directories.
Click to hide internal directories.