Documentation ¶
Index ¶
- Variables
- func ArrayIndex(index Value) (uint32, bool)
- func GoBool(value Value) bool
- func GoFloat64(value Value) float64
- func GoFunction(value Value) func(...Value) Value
- func IsPrimitive(value Value) bool
- type Array
- type BigInt
- type Boolean
- func AbstractEqual(left Value, right Value) Boolean
- func AbstractNotEqual(left Value, right Value) Boolean
- func Greater(left Value, right Value) Boolean
- func GreaterOrEqual(left Value, right Value) Boolean
- func InstanceOf(left Value, right Value) Boolean
- func Less(left Value, right Value) Boolean
- func LessOrEqual(left Value, right Value) Boolean
- func Not(value Value) Boolean
- func StrictEqual(left Value, right Value) Boolean
- func StrictNotEqual(left Value, right Value) Boolean
- type BooleanWrapper
- type Function
- type Number
- func Divide(left Value, right Value) Number
- func Minus(left Value, right Value) Number
- func Modulus(left Value, right Value) Number
- func Multiply(left Value, right Value) Number
- func PostDecrement(value *Value) Number
- func PostIncrement(value *Value) Number
- func PreDecrement(value *Value) Number
- func PreIncrement(value *Value) Number
- func UnaryMinus(value Value) Number
- func UnaryPlus(value Value) Number
- type NumberWrapper
- type Object
- type RangeError
- type String
- type StringWrapper
- type SyntaxError
- type TypeError
- type Value
- func And(leftFunc func() Value, rightFunc func() Value) Value
- func Assign(left *Value, right Value) Value
- func AssignWithOperator(left *Value, operator func(Value, Value) Value, right Value) Value
- func Or(leftFunc func() Value, rightFunc func() Value) Value
- func Plus(left Value, right Value) Value
- func Sequence(values ...Value) Value
- func ToPrimitiveValue(value Value) Value
Constants ¶
This section is empty.
Variables ¶
View Source
var NULL = null{}
View Source
var UNDEFINED = undefined{}
Functions ¶
func ArrayIndex ¶
func GoFunction ¶
func IsPrimitive ¶
Types ¶
type Boolean ¶
type Boolean bool
func AbstractEqual ¶
func AbstractNotEqual ¶
func GreaterOrEqual ¶
func InstanceOf ¶
func LessOrEqual ¶
func StrictEqual ¶
func StrictNotEqual ¶
type BooleanWrapper ¶
func NewBooleanWrapper ¶
func NewBooleanWrapper(boolean Boolean) *BooleanWrapper
type Function ¶
func NewFunction ¶
type Number ¶
type Number float64
func PostDecrement ¶
func PostIncrement ¶
func PreDecrement ¶
func PreIncrement ¶
func UnaryMinus ¶
type NumberWrapper ¶
func NewNumberWrapper ¶
func NewNumberWrapper(number Number) *NumberWrapper
type Object ¶
TODO: This should be a map to property descriptors.
Which should provide additional flags about the property (e.g., it is a getter, can it be set, etc.).
type RangeError ¶
func NewRangeError ¶
func NewRangeError(message string) *RangeError
func (*RangeError) String ¶
func (e *RangeError) String() string
type StringWrapper ¶
func NewStringWrapper ¶
func NewStringWrapper(str String) *StringWrapper
type SyntaxError ¶
func NewSyntaxError ¶
func NewSyntaxError(message string) *SyntaxError
func (*SyntaxError) String ¶
func (e *SyntaxError) String() string
type TypeError ¶
func NewTypeError ¶
type Value ¶
type Value interface { TypeOf() string String() string Get(name Value) Value Set(name Value, value Value) Value }
func Assign ¶
We need this helper because assignment in Go is not an expression, but here we pass the right value through.
func AssignWithOperator ¶
We need this helper because assignment in Go is not an expression, but here we pass the right value through.
func ToPrimitiveValue ¶
TODO: If value is a Date object, first do toString, then valueOf.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.