Documentation ¶
Index ¶
- Constants
- type Array
- type BindedObject
- type BindedObjectType
- type Boolean
- type BuiltinConstant
- type BuiltinConstantType
- type BuiltinFuncArgument
- type BuiltinFuncReturnReference
- type BuiltinFuncReturnResult
- type BuiltinFunction
- type Empty
- type Environment
- type Error
- type Function
- type HashKey
- type HashPair
- type HashTable
- type Hashable
- type Integer
- type Null
- type Object
- type ObjectType
- type ResultValue
- type String
Constants ¶
View Source
const ( LOCAL = "LOCAL" PUBLIC = "PUBLIC" CONST = "CONST" // 上書き不可 )
View Source
const ( INTEGER_OBJ = "INTEGER" NULL_OBJ = "NULL" EMPTY_OBJ = "EMPTY" BOOLEAN_OBJ = "BOOLEAN" FUNCTION_OBJ = "FUNCTION" ERROR_OBJ = "ERROR" RESULT_VALUE_OBJ = "RESULT_VALUE" STRING_OBJ = "STRING" BUILTIN_FUNCTION_OBJ = "BUILTIN_FUNCTION_OBJ" BUILTIN_CONSTANT_OBJ = "BUILTIN_CONSTANT_OBJ" ARRAY_OBJ = "ARRAY" HASHTBL_OBJ = "HASHTBL_OBJ" BUILTIN_FUNC_RETURN_RESULT_OBJ = "BUILTIN_FUNC_RETURN_RESULT" BUILTIN_FUNC_RETURN_REFERENCE_OBJ = "BUILTIN_FUNC_RETURN_REFERENCE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Elements []Object
}
func (*Array) Type ¶
func (a *Array) Type() ObjectType
type BindedObject ¶
type BindedObject struct { Key string // なくてもいいけどデバッグ用に入れている Object Object Type BindedObjectType }
type BindedObjectType ¶
type BindedObjectType string
type Boolean ¶
type Boolean struct {
Value bool
}
func (*Boolean) Type ¶
func (b *Boolean) Type() ObjectType
type BuiltinConstant ¶
type BuiltinConstant struct { T BuiltinConstantType Value Object }
func (*BuiltinConstant) Inspect ¶
func (bc *BuiltinConstant) Inspect() string
func (*BuiltinConstant) Type ¶
func (bc *BuiltinConstant) Type() ObjectType
type BuiltinConstantType ¶
type BuiltinConstantType string
type BuiltinFuncArgument ¶
type BuiltinFuncArgument struct { Expression ast.Expression Value Object }
type BuiltinFuncReturnReference ¶
type BuiltinFuncReturnReference struct { Expression ast.Expression Value Object Result Object }
func (*BuiltinFuncReturnReference) Inspect ¶
func (b *BuiltinFuncReturnReference) Inspect() string
func (*BuiltinFuncReturnReference) Type ¶
func (b *BuiltinFuncReturnReference) Type() ObjectType
type BuiltinFuncReturnResult ¶
type BuiltinFuncReturnResult struct {
Value Object
}
func (*BuiltinFuncReturnResult) Inspect ¶
func (b *BuiltinFuncReturnResult) Inspect() string
func (*BuiltinFuncReturnResult) Type ¶
func (b *BuiltinFuncReturnResult) Type() ObjectType
type BuiltinFunction ¶
type BuiltinFunction struct {
Fn func(args ...BuiltinFuncArgument) Object
}
func (*BuiltinFunction) Inspect ¶
func (bf *BuiltinFunction) Inspect() string
func (*BuiltinFunction) Type ¶
func (bf *BuiltinFunction) Type() ObjectType
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) BindedObject ¶
func (e *Environment) BindedObject(name string) (*BindedObject, bool)
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type Function ¶
type Function struct { Name string Parameters []*ast.Identifier Body *ast.BlockStatement Env *Environment IsProc bool }
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value uint64 }
type HashTable ¶
func (*HashTable) GetPairByIndex ¶
func (*HashTable) Type ¶
func (ht *HashTable) Type() ObjectType
type Integer ¶
type Integer struct {
Value int64
}
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
type ResultValue ¶
type ResultValue struct {
Value Object
}
func (*ResultValue) Inspect ¶
func (rv *ResultValue) Inspect() string
func (*ResultValue) Type ¶
func (rv *ResultValue) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.