Documentation
¶
Index ¶
- Constants
- Variables
- type Array
- func (a *Array) CallMethod(method string, args ...Object) Object
- func (a *Array) Count(args ...Object) Object
- func (a *Array) Filter(args ...Object) Object
- func (a *Array) Index(args ...Object) Object
- func (a *Array) Inspect() string
- func (a *Array) Map(args ...Object) Object
- func (a *Array) Merge(args ...Object) Object
- func (a *Array) Pop(args ...Object) Object
- func (a *Array) Push(args ...Object) Object
- func (a *Array) Reduce(args ...Object) Object
- func (a *Array) Type() ObjectType
- type Boolean
- type Break
- type Builtin
- type BuiltinFunc
- type Error
- type FileObject
- type Function
- type Hash
- func (h *Hash) CallMethod(method string, args ...Object) Object
- func (h *Hash) Filter(args ...Object) Object
- func (h *Hash) Inspect() string
- func (h *Hash) Keys(args ...Object) Object
- func (h *Hash) Map(args ...Object) Object
- func (h *Hash) Merge(args ...Object) Object
- func (h *Hash) Pop(args ...Object) Object
- func (h *Hash) Push(args ...Object) Object
- func (h *Hash) Type() ObjectType
- func (h *Hash) Values(args ...Object) Object
- type HashKey
- type HashPair
- type Hashable
- type IncludedObject
- type Integer
- type Interpolable
- type InterpolatedString
- type Null
- type Object
- type ObjectType
- type ReturnValue
- type Scope
- type String
- func (s *String) CallMethod(method string, args ...Object) Object
- func (s *String) Count(args ...Object) Object
- func (s *String) Find(args ...Object) Object
- func (s *String) HashKey() HashKey
- func (s *String) Inspect() string
- func (s *String) Join(args ...Object) Object
- func (s *String) Lower(args ...Object) Object
- func (s *String) Lstrip(args ...Object) Object
- func (s *String) Replace(args ...Object) Object
- func (s *String) Reverse(args ...Object) Object
- func (s *String) Rstrip(args ...Object) Object
- func (s *String) Split(args ...Object) Object
- func (s *String) Strip(args ...Object) Object
- func (s *String) Type() ObjectType
- func (s *String) Upper(args ...Object) Object
- type Struct
Constants ¶
View Source
const ( PREFIXOP int INFIXOP UNKNOWNIDENT NOMETHODERROR NOINDEXERROR KEYERROR INDEXERROR SLICEERROR ARGUMENTERROR INPUTERROR RTERROR CONSTRUCTERR INLENERR )
constants for error types
View Source
const ( INTEGER_OBJ = "INTEGER" BOOLEAN_OBJ = "BOOLEAN" NULL_OBJ = "NULL" RETURN_VALUE_OBJ = "RETURN_VALUE" BREAK_OBJ = "BREAK" ERROR_OBJ = "ERROR" FUNCTION_OBJ = "FUNCTION" STRING_OBJ = "STRING" BUILTIN_OBJ = "BUILTIN" ARRAY_OBJ = "ARRAY" HASH_OBJ = "HASH" INCLUDED_OBJ = "INCLUDE" STRUCT_OBJ = "STRUCT" FILE_OBJ = "FILE" )
INTEGER_OBJ/*_OBJ = object types
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Members []Object
}
func (*Array) Type ¶
func (a *Array) Type() ObjectType
type Boolean ¶
type Boolean struct{ Value bool }
func (*Boolean) Type ¶
func (b *Boolean) Type() ObjectType
type Builtin ¶
type Builtin struct {
Fn BuiltinFunc
}
func (*Builtin) Type ¶
func (b *Builtin) Type() ObjectType
type BuiltinFunc ¶
type Error ¶
type Error struct{ Message string }
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type FileObject ¶
func (*FileObject) CallMethod ¶
func (f *FileObject) CallMethod(method string, args ...Object) Object
func (*FileObject) Close ¶
func (f *FileObject) Close(args ...Object) Object
func (*FileObject) Inspect ¶
func (f *FileObject) Inspect() string
func (*FileObject) Read ¶
func (f *FileObject) Read(args ...Object) Object
func (*FileObject) ReadLine ¶
func (f *FileObject) ReadLine(args ...Object) Object
func (*FileObject) Type ¶
func (f *FileObject) Type() ObjectType
type Function ¶
type Function struct { Literal *ast.FunctionLiteral Scope *Scope }
func (*Function) Type ¶
func (r *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value uint64 }
type IncludedObject ¶
func (*IncludedObject) CallMethod ¶
func (io *IncludedObject) CallMethod(method string, args ...Object) Object
func (*IncludedObject) Inspect ¶
func (io *IncludedObject) Inspect() string
func (*IncludedObject) Type ¶
func (io *IncludedObject) Type() ObjectType
type Integer ¶
type Integer struct{ Value int64 }
func (*Integer) Type ¶
func (i *Integer) Type() ObjectType
type Interpolable ¶
type Interpolable interface {
Interpolate(scope *Scope)
}
type InterpolatedString ¶
type InterpolatedString struct { Value *String RawValue string Expressions map[byte]ast.Expression }
func (*InterpolatedString) CallMethod ¶
func (is *InterpolatedString) CallMethod(method string, args ...Object) Object
func (*InterpolatedString) Inspect ¶
func (is *InterpolatedString) Inspect() string
func (*InterpolatedString) Interpolate ¶
func (is *InterpolatedString) Interpolate(scope *Scope)
func (*InterpolatedString) Type ¶
func (is *InterpolatedString) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string CallMethod(method string, args ...Object) Object }
type ObjectType ¶
type ObjectType string
type ReturnValue ¶
type ReturnValue struct{ Value Object }
func (*ReturnValue) CallMethod ¶
func (rv *ReturnValue) CallMethod(method string, args ...Object) Object
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() ObjectType
type String ¶
type String struct{ Value string }
func (*String) Type ¶
func (s *String) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.