bif

package
v0.0.0-...-490b20b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var F = map[string]object.Func{}/* 106 elements not displayed */

F is a map that have built-in functions

Functions

func AppendNode

func AppendNode(src []object.Node, target object.Node) []object.Node

AppendNode append target node to the src

func CastType

func CastType(tg object.Item, ty object.Type) object.Item

CastType convert target item type to a specific type

func CopyFocus

func CopyFocus(ctx *object.Context) *object.Focus

CopyFocus copy focus from context

func IsAnyAtomic

func IsAnyAtomic(item object.Item) bool

IsAnyAtomic checks if item is an atomic

func IsAnyFunc

func IsAnyFunc(item object.Item) bool

IsAnyFunc checks if item is a function or map or array

func IsAnyFuncSeq

func IsAnyFuncSeq(item object.Item) bool

IsAnyFuncSeq checks if item is a object.Sequence that have only AnyFunction type

func IsArray

func IsArray(item object.Item) bool

IsArray checks if item is an object.Array

func IsArrayEmpty

func IsArrayEmpty(item object.Item) bool

IsArrayEmpty checks if item is an empty object.Array

func IsArraySeq

func IsArraySeq(item object.Item) bool

IsArraySeq checks if item is a object.Sequence that have only object.Array type

func IsAtomicSeq

func IsAtomicSeq(item object.Item) bool

IsAtomicSeq checks if item is a object.Sequence that have only atomic type

func IsAttrNodeSeq

func IsAttrNodeSeq(item object.Item) bool

IsAttrNodeSeq checks if item is a object.Sequence that have only AttributeNode type

func IsBoolean

func IsBoolean(item object.Item) bool

IsBoolean checks if item is an object.Boolean

func IsCastable

func IsCastable(tg object.Item, ty object.Type) object.Item

IsCastable checks if item can be casted to a specific type

func IsCommNodeSeq

func IsCommNodeSeq(item object.Item) bool

IsCommNodeSeq checks if item is a object.Sequence that have only CommentNode type

func IsContainN

func IsContainN(src []object.Node, target object.Node) bool

IsContainN checks if src contains the target node

func IsDocNodeSeq

func IsDocNodeSeq(item object.Item) bool

IsDocNodeSeq checks if item is a object.Sequence that have only DocumentNode type

func IsEQ

func IsEQ(left, right object.Item) object.Item

IsEQ checks if left item and right item has eqaul value

func IsElemNodeSeq

func IsElemNodeSeq(item object.Item) bool

IsElemNodeSeq checks if item is a object.Sequence that have only ElementNode type

func IsError

func IsError(item object.Item) bool

IsError checks if item is an object.Error

func IsFunc

func IsFunc(item object.Item) bool

IsFunc checks if item is a function

func IsGE

func IsGE(left, right object.Item) object.Item

IsGE checks if left item is greater-than-or-equal to the right item

func IsGT

func IsGT(left, right object.Item) object.Item

IsGT checks if left item is greater-than the right item

func IsItem

func IsItem(item object.Item) bool

IsItem checks if item is an Item

func IsItemSeq

func IsItemSeq(item object.Item) bool

IsItemSeq checks if item is a object.Sequence that have only Item type

func IsKindMatch

func IsKindMatch(n object.Node, typeID byte) bool

IsKindMatch checks node kind by typeID

func IsLE

func IsLE(left, right object.Item) object.Item

IsLE checks if left item is less-than-or-equal to the right item

func IsLT

func IsLT(left, right object.Item) object.Item

IsLT checks if left item is less-than the right item

func IsMap

func IsMap(item object.Item) bool

IsMap checks if item is an object.Map

func IsMapSeq

func IsMapSeq(item object.Item) bool

IsMapSeq checks if item is a object.Sequence that have only object.Map type

func IsNE

func IsNE(left, right object.Item) object.Item

IsNE checks if left item is not eqaul to the right item

func IsNode

func IsNode(item object.Item) bool

IsNode checks if item is a node

func IsNodeSeq

func IsNodeSeq(item object.Item) bool

IsNodeSeq checks if item is a object.Sequence that have only node type

func IsNumeric

func IsNumeric(item object.Item) bool

IsNumeric checks if item is a numeric

func IsOccurMatch

func IsOccurMatch(item object.Item, t token.Token) bool

IsOccurMatch checks if item occurrence match with the type t

func IsPlaceholder

func IsPlaceholder(item object.Item) bool

IsPlaceholder checks if item is an object.Placeholder

func IsPrecede

func IsPrecede(n1, n2 object.Node, src *object.BaseNode) object.Item

IsPrecede checks if n1 is precede n2 in document order https://www.w3.org/TR/xpath-31/#id-document-order

func IsSameAtomic

func IsSameAtomic(item object.Item, val interface{}) bool

IsSameAtomic compares object.Item with golang primitive type and return true if value is the same

func IsSeq

func IsSeq(item object.Item) bool

IsSeq checks if item is an object.Sequence

func IsSeqEmpty

func IsSeqEmpty(item object.Item) bool

IsSeqEmpty checks if item is an empty object.Sequence

func IsString

func IsString(item object.Item) bool

IsString checks if item is an object.String

func IsTextNodeSeq

func IsTextNodeSeq(item object.Item) bool

IsTextNodeSeq checks if item is a object.Sequence that have only TextNode type

func IsTypeMatch

func IsTypeMatch(item object.Item, st *ast.SequenceType) object.Item

IsTypeMatch checks if item type is match with the SequenceType

func NewBoolean

func NewBoolean(b bool) *object.Boolean

NewBoolean creates object.Boolean

func NewDecimal

func NewDecimal(d float64) *object.Decimal

NewDecimal creates object.Decimal

func NewDouble

func NewDouble(d float64) *object.Double

NewDouble creates object.Double

func NewError

func NewError(format string, a ...interface{}) *object.Error

NewError cteates object.Error

func NewInteger

func NewInteger(i int) *object.Integer

NewInteger creates object.Integer

func NewSequence

func NewSequence(items ...object.Item) *object.Sequence

NewSequence creates object.Sequence

func NewString

func NewString(s string) *object.String

NewString creates object.String

func ReplaceFocus

func ReplaceFocus(ctx *object.Context, focus *object.Focus)

ReplaceFocus replace context focus to the passed focus

func UnwrapArr

func UnwrapArr(item object.Item) []object.Item

UnwrapArr unwrap all array and sequence

func UnwrapSeq

func UnwrapSeq(item object.Item) []object.Item

UnwrapSeq unwrap all sequence in a sequence

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL