Documentation
¶
Index ¶
Constants ¶
View Source
const ( Bit Unit = 1 Hex = 4 Octett = 8 )
View Source
const ( UNKNOWN ObjectType = "unknown" UNDEFINED = "undefined" RUNTIME_ERROR = "runtime error" RETURN_VALUE = "return value" INTEGER = "integer" FLOAT = "float" BOOL = "boolean" STRING = "string" BINARY_STRING = "binary string" FUNCTION = "function" VERDICT = "verdict" )
Variables ¶
View Source
var ErrSyntax = errors.New("invalid syntax")
View Source
var (
Undefined = &undefined{}
)
Functions ¶
Types ¶
type BinaryString ¶
func NewBinaryString ¶
func NewBinaryString(s string) (*BinaryString, error)
func (*BinaryString) Inspect ¶
func (b *BinaryString) Inspect() string
func (*BinaryString) Type ¶
func (b *BinaryString) Type() ObjectType
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type Function ¶
type Function struct {
Params *ast.FormalPars
Body *ast.BlockStmt
Env *Env
}
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type Object ¶
type Object interface {
Inspect() string
Type() ObjectType
}
type ObjectType ¶
type ObjectType string
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
func (*ReturnValue) Inspect ¶
func (r *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (r *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.