Documentation ¶
Index ¶
- Variables
- func Add(a, b interface{}) interface{}
- func AndNot(a, b interface{}) interface{}
- func Append(a interface{}, vals ...interface{}) (ret interface{})
- func BitAnd(a, b interface{}) interface{}
- func BitNot(a interface{}) interface{}
- func BitOr(a, b interface{}) interface{}
- func Bool(a interface{}) bool
- func Cap(a interface{}) int
- func CloseChan(v interface{})
- func Copy(a, b interface{}) int
- func Dec(a interface{}) interface{}
- func Delete(m interface{}, key interface{})
- func EQ(a, b interface{}) interface{}
- func Elem(a interface{}) interface{}
- func Float32(a interface{}) float32
- func Float64(a interface{}) float64
- func GE(a, b interface{}) interface{}
- func GT(a, b interface{}) interface{}
- func Get(m interface{}, key interface{}, defaultValues ...interface{}) (result interface{})
- func GetVar(m interface{}, key interface{}) interface{}
- func In(a, b interface{}) interface{}
- func Inc(a interface{}) interface{}
- func Int(a interface{}) int
- func Int16(a interface{}) int16
- func Int32(a interface{}) int32
- func Int64(a interface{}) int64
- func Int8(a interface{}) int8
- func LE(a, b interface{}) interface{}
- func LT(a, b interface{}) interface{}
- func Len(a interface{}) int
- func Lshr(a, b interface{}) interface{}
- func Make(typ yaksepc.GoTyper, args ...int) interface{}
- func Map(key, elem interface{}) interface{}
- func MapFrom(args ...interface{}) interface{}
- func MapInit(args ...interface{}) interface{}
- func MapOf(key, val interface{}) interface{}
- func Max(args ...interface{}) (max interface{})
- func Min(args ...interface{}) (min interface{})
- func Mkmap(typ interface{}, n ...int) interface{}
- func Mkslice(typ interface{}, args ...interface{}) interface{}
- func Mod(a, b interface{}) interface{}
- func Mul(a, b interface{}) interface{}
- func NE(a, b interface{}) interface{}
- func Neg(a interface{}) interface{}
- func Not(a interface{}) interface{}
- func Panic(v interface{})
- func Panicf(format string, args ...interface{})
- func Quo(a, b interface{}) interface{}
- func Rshr(a, b interface{}) interface{}
- func Set(m interface{}, args ...interface{})
- func SetIndex(m, key, v interface{})
- func Slice(elem interface{}) interface{}
- func SliceFrom(args ...interface{}) interface{}
- func SliceFromTy(args ...interface{}) interface{}
- func SliceOf(typ interface{}) interface{}
- func String(a interface{}) string
- func StringEx(a interface{}, verbose string) string
- func StructInit(args ...interface{}) interface{}
- func Sub(a, b interface{}) interface{}
- func SubSlice(a, i, j interface{}) interface{}
- func Ternary(condation, a, b interface{}) interface{}
- func Uint(a interface{}) uint
- func Uint16(a interface{}) uint16
- func Uint32(a interface{}) uint32
- func Uint64(a interface{}) uint64
- func Uint8(a interface{}) byte
- func Xor(a, b interface{}) interface{}
Constants ¶
This section is empty.
Variables ¶
var TyBool = tyBool(0)
TyBool represents the `bool` type.
var TyByte = TyUint8
TyByte represents the `byte` type.
var TyFloat = TyFloat64
TyFloat represents the `float` type.
var TyFloat32 = tyFloat32(0)
TyFloat32 represents the `float32` type.
var TyFloat64 = tyFloat64(0)
TyFloat64 represents the `float64` type.
var TyInt = tyInt(0)
TyInt represents the `int` type.
var TyInt16 = tyInt16(0)
TyInt16 represents the `int16` type.
var TyInt32 = tyInt32(0)
TyInt32 represents the `int32` type.
var TyInt64 = tyInt64(0)
TyInt64 represents the `int64` type.
var TyInt8 = tyInt8(0)
TyInt8 represents the `int8` type.
var TyString = tyString(0)
TyString represents the `string` type.
var TyUint = tyUint(0)
TyUint represents the `uint` type.
var TyUint16 = tyUint16(0)
TyUint16 represents the `uint16` type.
var TyUint32 = tyUint32(0)
TyUint32 represents the `uint32` type.
var TyUint64 = tyUint64(0)
TyUint64 represents the `uint64` type.
var TyUint8 = tyUint8(0)
TyUint8 represents the `uint8` type.
var TyVar = tyVar(0)
TyVar represents the `var` type.
var YaklangBaseLib = map[string]interface{}{ "append": Append, "copy": Copy, "delete": Delete, "get": Get, "len": Len, "cap": Cap, "mkmap": Mkmap, "mapFrom": MapFrom, "mapOf": MapOf, "panic": Panic, "panicf": Panicf, "print": fmt.Print, "printf": fmt.Printf, "println": fmt.Println, "sprint": fmt.Sprint, "sprintf": fmt.Sprintf, "sprintln": fmt.Sprintln, "fprintln": fmt.Fprintln, "set": Set, "mkslice": Mkslice, "slice": Mkslice, "sliceFrom": sliceFrom, "sliceOf": SliceOf, "sub": SubSlice, "make": Make, "close": CloseChan, "float": TyFloat64, "float64": TyFloat64, "float32": TyFloat32, "int8": TyInt8, "int16": TyInt16, "int32": TyInt32, "int64": TyInt64, "int": TyInt, "uint": TyUint, "byte": TyUint8, "uint8": TyUint8, "uint16": TyUint16, "uint32": TyUint32, "uint64": TyUint64, "string": TyString, "bool": TyBool, "var": TyVar, "type": typeOf, "max": Max, "min": Min, "undefined": yaklangspec.Undefined, "nil": nil, "true": true, "false": false, "$elem": Elem, "$neg": Neg, "$mul": Mul, "$quo": Quo, "$mod": Mod, "$add": Add, "$sub": Sub, "$ternary": Ternary, "$in": In, "$xor": Xor, "$lshr": Lshr, "$rshr": Rshr, "$bitand": BitAnd, "$bitor": BitOr, "$bitnot": BitNot, "$andnot": AndNot, "$lt": LT, "$gt": GT, "$le": LE, "$ge": GE, "$eq": EQ, "$ne": NE, "$not": Not, }
Functions ¶
func Append ¶
func Append(a interface{}, vals ...interface{}) (ret interface{})
Append does append(a, vals...)
func Cap ¶
func Cap(a interface{}) int
Cap returns capacity of a collection object. object can be a slice, an array or a chan.
func Get ¶
func Get(m interface{}, key interface{}, defaultValues ...interface{}) (result interface{})
Get gets a value from an object. object can be a slice, an array, a map or a user-defined class.
func GetVar ¶
func GetVar(m interface{}, key interface{}) interface{}
GetVar returns a member variable of an object. object can be a slice, an array, a map or a user-defined class.
func Len ¶
func Len(a interface{}) int
Len returns length of a collection object. object can be a slice, an array, a map, a string or a chan.
func MapInit ¶
func MapInit(args ...interface{}) interface{}
MapInit creates a map object from `mapInit(mapType, member1, val1, ...)`.
func Mkslice ¶
func Mkslice(typ interface{}, args ...interface{}) interface{}
Mkslice returns a new slice.
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf panics with sprintf(format, args...).
func Set ¶
func Set(m interface{}, args ...interface{})
Set sets (index, value) pairs to an object. object can be a slice, an array, a map or a user-defined class.
func SetIndex ¶
func SetIndex(m, key, v interface{})
SetIndex sets a (index, value) pair to an object. object can be a slice, an array, a map or a user-defined class.
func SliceFrom ¶
func SliceFrom(args ...interface{}) interface{}
SliceFrom creates a slice from [a1, a2, ...].
func SliceFromTy ¶
func SliceFromTy(args ...interface{}) interface{}
SliceFromTy creates a slice from `[]T{a1, a2, ...}`.
func StructInit ¶
func StructInit(args ...interface{}) interface{}
StructInit creates a struct object from `structInit(structType, member1, val1, ...)`.
Types ¶
This section is empty.