Documentation
¶
Index ¶
- Constants
- Variables
- func IndexByte(s []byte, b byte) int
- func IndexByteAt(s []byte, b byte, at int) int
- func IndexByteAtNE(s []byte, b byte, at int) int
- func IndexByteNE(s []byte, b byte) int
- type Byteptr
- func (p *Byteptr) Bytes() []byte
- func (p *Byteptr) CheckBit(pos int) bool
- func (p *Byteptr) Init(s []byte, offset, len int) *Byteptr
- func (p *Byteptr) InitRaw(addr uintptr, offset, len int) *Byteptr
- func (p *Byteptr) InitStr(s string, offset, len int) *Byteptr
- func (p *Byteptr) InitString(s string, offset, len int) *Byteptr
- func (p *Byteptr) Len() int
- func (p *Byteptr) Offset() int
- func (p *Byteptr) RawBytes() []byte
- func (p *Byteptr) RawString() string
- func (p *Byteptr) Reset()
- func (p *Byteptr) SetAddr(addr uintptr, cap int) *Byteptr
- func (p *Byteptr) SetBit(pos int, value bool)
- func (p *Byteptr) SetLen(len int) *Byteptr
- func (p *Byteptr) SetOffset(offset int) *Byteptr
- func (p *Byteptr) String() string
- func (p *Byteptr) TakeAddr(s []byte) *Byteptr
- func (p *Byteptr) TakeStrAddr(s string) *Byteptr
- func (p *Byteptr) TakeStringAddr(s string) *Byteptr
- type Helper
- type Index
- type Interface
- type Node
- func (n *Node) AcquireChild(depth int) (*Node, int)
- func (n *Node) AcquireChildWithType(depth int, typ Type) (*Node, int)
- func (n *Node) AliasOf(node *Node) *Node
- func (n *Node) Array() *Node
- func (n *Node) At(idx int) *Node
- func (n *Node) Beautify(w io.Writer) error
- func (n *Node) Bool() bool
- func (n *Node) Bytes() []byte
- func (n *Node) Children() []Node
- func (n *Node) ChildrenIndices() []int
- func (n *Node) Depth() int
- func (n *Node) Dot(path string) *Node
- func (n *Node) DotArray(path string) *Node
- func (n *Node) DotBool(path string) bool
- func (n *Node) DotBytes(path string) []byte
- func (n *Node) DotFloat(path string) (float64, error)
- func (n *Node) DotInt(path string) (int64, error)
- func (n *Node) DotObject(path string) *Node
- func (n *Node) DotString(path string) string
- func (n *Node) DotUint(path string) (uint64, error)
- func (n *Node) Each(fn func(idx int, node *Node))
- func (n *Node) EqualWith(exp *Node) bool
- func (n *Node) Exists(key string) bool
- func (n *Node) FirstChild() *Node
- func (n *Node) Float() (float64, error)
- func (n *Node) ForceBytes() []byte
- func (n *Node) ForceString() string
- func (n *Node) Get(keys ...string) *Node
- func (n *Node) GetArray(keys ...string) *Node
- func (n *Node) GetArrayPS(path, separator string) *Node
- func (n *Node) GetBool(keys ...string) bool
- func (n *Node) GetBoolPS(path, separator string) bool
- func (n *Node) GetBytes(keys ...string) []byte
- func (n *Node) GetBytesPS(path, separator string) []byte
- func (n *Node) GetFloat(keys ...string) (float64, error)
- func (n *Node) GetFloatPS(path, separator string) (float64, error)
- func (n *Node) GetInt(keys ...string) (int64, error)
- func (n *Node) GetIntPS(path, separator string) (int64, error)
- func (n *Node) GetObject(keys ...string) *Node
- func (n *Node) GetObjectPS(path, separator string) *Node
- func (n *Node) GetPS(path, separator string) *Node
- func (n *Node) GetString(keys ...string) string
- func (n *Node) GetStringPS(path, separator string) string
- func (n *Node) GetUint(keys ...string) (uint64, error)
- func (n *Node) GetUintPS(path, separator string) (uint64, error)
- func (n *Node) Index() int
- func (n *Node) Int() (int64, error)
- func (n *Node) Key() *Byteptr
- func (n *Node) KeyBytes() []byte
- func (n *Node) KeyString() string
- func (n *Node) LastChild() *Node
- func (n *Node) Limit() int
- func (n *Node) Look(key string) *Node
- func (n *Node) Marshal(w io.Writer) error
- func (n *Node) Object() *Node
- func (n *Node) Offset() int
- func (n *Node) RawBytes() []byte
- func (n *Node) ReleaseChild(idx int, node *Node) *Node
- func (n *Node) RemoveIf(cond func(idx int, node *Node) bool)
- func (n *Node) Reset() *Node
- func (n *Node) SetLimit(limit int) *Node
- func (n *Node) SetOffset(offset int) *Node
- func (n *Node) SetType(typ Type)
- func (n *Node) Sort() *Node
- func (n *Node) SortKeys() *Node
- func (n *Node) String() string
- func (n *Node) SwapWith(node *Node)
- func (n *Node) Type() Type
- func (n *Node) Uint() (uint64, error)
- func (n *Node) Value() *Byteptr
- type Type
- type Vector
- func (vec *Vector) AcquireChild(root *Node, depth int) (*Node, int)
- func (vec *Vector) AcquireChildWithType(root *Node, depth int, typ Type) (*Node, int)
- func (vec *Vector) AcquireNode(depth int) (node *Node, idx int)
- func (vec *Vector) AcquireNodeWithType(depth int, typ Type) (*Node, int)
- func (vec *Vector) Beautify(w io.Writer) error
- func (vec *Vector) Buf() []byte
- func (vec *Vector) BufAppend(s []byte)
- func (vec *Vector) BufAppendByte(b byte)
- func (vec *Vector) BufAppendFloat(f float64)
- func (vec *Vector) BufAppendFloatTune(f float64, fmt byte, prec, bitSize int)
- func (vec *Vector) BufAppendInt(i int64)
- func (vec *Vector) BufAppendStr(s string)
- func (vec *Vector) BufAppendUint(u uint64)
- func (vec *Vector) BufLen() int
- func (vec *Vector) BufReplaceWith(b []byte)
- func (vec *Vector) BufUpdateWith(b []byte)
- func (vec *Vector) Bufferize(b []byte) []byte
- func (vec *Vector) BufferizeByte(b byte) []byte
- func (vec *Vector) BufferizeFloat(f float64) []byte
- func (vec *Vector) BufferizeFloatTune(f float64, fmt byte, prec, bitSize int) []byte
- func (vec *Vector) BufferizeInt(i int64) []byte
- func (vec *Vector) BufferizeString(s string) []byte
- func (vec *Vector) BufferizeUint(u uint64) []byte
- func (vec *Vector) Dot(path string) *Node
- func (vec *Vector) DotArray(path string) *Node
- func (vec *Vector) DotBool(path string) bool
- func (vec *Vector) DotBytes(path string) []byte
- func (vec *Vector) DotFloat(path string) (float64, error)
- func (vec *Vector) DotInt(path string) (int64, error)
- func (vec *Vector) DotObject(path string) *Node
- func (vec *Vector) DotString(path string) string
- func (vec *Vector) DotUint(path string) (uint64, error)
- func (vec *Vector) Each(fn func(idx int, node *Node))
- func (vec *Vector) EqualWith(exp *Vector) bool
- func (vec *Vector) ErrorOffset() int
- func (vec *Vector) Exists(key string) bool
- func (vec *Vector) ForgetFrom(idx int)
- func (vec *Vector) Get(keys ...string) *Node
- func (vec *Vector) GetArray(keys ...string) *Node
- func (vec *Vector) GetArrayPS(path, separator string) *Node
- func (vec *Vector) GetBool(keys ...string) bool
- func (vec *Vector) GetBoolPS(path, separator string) bool
- func (vec *Vector) GetByIdx(idx int) *Node
- func (vec *Vector) GetBytes(keys ...string) []byte
- func (vec *Vector) GetBytesPS(path, separator string) []byte
- func (vec *Vector) GetChild(root *Node, depth int) (*Node, int)
- func (vec *Vector) GetChildWT(root *Node, depth int, typ Type) (*Node, int)
- func (vec *Vector) GetFloat(keys ...string) (float64, error)
- func (vec *Vector) GetFloatPS(path, separator string) (float64, error)
- func (vec *Vector) GetInt(keys ...string) (int64, error)
- func (vec *Vector) GetIntPS(path, separator string) (int64, error)
- func (vec *Vector) GetNode(depth int) (node *Node, idx int)
- func (vec *Vector) GetNodeWT(depth int, typ Type) (*Node, int)
- func (vec *Vector) GetObject(keys ...string) *Node
- func (vec *Vector) GetObjectPS(path, separator string) *Node
- func (vec *Vector) GetPS(path, separator string) *Node
- func (vec *Vector) GetString(keys ...string) string
- func (vec *Vector) GetStringPS(path, separator string) string
- func (vec *Vector) GetUint(keys ...string) (uint64, error)
- func (vec *Vector) GetUintPS(path, separator string) (uint64, error)
- func (vec *Vector) KeepPtr()
- func (vec *Vector) Len() int
- func (vec *Vector) Marshal(w io.Writer) error
- func (vec *Vector) NodeAt(idx int) *Node
- func (vec *Vector) Parse(_ []byte) error
- func (vec *Vector) ParseCopy(_ []byte) error
- func (vec *Vector) ParseCopyStr(_ string) error
- func (vec *Vector) ParseCopyString(_ string) error
- func (vec *Vector) ParseFile(path string) error
- func (vec *Vector) ParseReader(r io.Reader) (err error)
- func (vec *Vector) ParseStr(_ string) error
- func (vec *Vector) ParseString(_ string) error
- func (vec *Vector) Prealloc(size uint)
- func (vec *Vector) PutNode(idx int, node *Node)
- func (vec *Vector) ReadRuneAt(i int) (r rune, w int, err error)
- func (vec *Vector) ReleaseNode(idx int, node *Node)
- func (vec *Vector) RemoveIf(cond func(idx int, node *Node) bool)
- func (vec *Vector) Reset()
- func (vec *Vector) Root() *Node
- func (vec *Vector) RootByIndex(index int) *Node
- func (vec *Vector) RootLen() int
- func (vec *Vector) RootTop() *Node
- func (vec *Vector) SetErrOffset(offset int)
- func (vec *Vector) SetHelper(helper Helper)
- func (vec *Vector) SetSrc(s []byte, copy bool) error
- func (vec *Vector) Src() []byte
- func (vec *Vector) SrcAddr() uintptr
- func (vec *Vector) SrcAt(i int) byte
- func (vec *Vector) SrcLen() int
Constants ¶
const ( // FlagInit points vector is properly initialized. FlagInit = iota // FlagNoClear disables clear step. FlagNoClear // FlagExtraBool enables YAML style bool check [On, Off] in addition to [true, false]. FlagExtraBool )
Variables ¶
var ( ErrEmptySrc = errors.New("can't parse empty source") ErrShortSrc = errors.New("source is too short to parse") ErrNotImplement = errors.New("method not implemented") ErrIncompatType = errors.New("incompatible type") ErrNotFound = errors.New("node not found") ErrInternal = errors.New("internal vector error") ErrNoHelper = errors.New("helper not found") ErrUnparsedTail = errors.New("unparsed tail") ErrUnexpId = errors.New("unexpected identifier") ErrUnexpEOF = errors.New("unexpected end of file") ErrUnexpEOS = errors.New("unexpected end of string") )
Functions ¶
func IndexByteAt ¶ added in v1.2.8
IndexByteAt returns position of b in s starting from position at. Return -1 if not found.
func IndexByteAtNE ¶ added in v1.2.8
IndexByteAtNE returns position of non-escaped b in s from position at. Return -1 if not found.
func IndexByteNE ¶ added in v1.2.8
IndexByteNE returns position of non-escaped b in s. Return -1 if not found.
Types ¶
type Byteptr ¶
type Byteptr struct {
// contains filtered or unexported fields
}
func (*Byteptr) InitString ¶ added in v1.2.5
func (*Byteptr) TakeStrAddr ¶ added in v1.2.5
DEPRECATED: use TakeStringAddr instead.
func (*Byteptr) TakeStringAddr ¶ added in v1.2.5
type Helper ¶
type Helper interface {
// Indirect convert byteptr to byte slice and apply custom logic.
Indirect(*Byteptr) []byte
// Beautify makes a beauty view of node.
Beautify(io.Writer, *Node) error
// Marshal serializes node.
Marshal(io.Writer, *Node) error
}
Helper object interface.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents nodes index matrix.
Contain indexes of nodes in the vector divided by depth. Y-axis means depth, X-axis means position in index.
type Interface ¶
type Interface interface {
// SetHelper provides Helper to escape/unescape strings.
SetHelper(helper Helper)
// Parse parses source bytes.
Parse(source []byte) error
// ParseCopy makes a copy of source bytes and parse it.
ParseCopy(source []byte) error
// ParseString parses source string.
// Note, string parsing may be unsafe due to in-place unescape issues. Use ParseCopyString or Parse in that case.
ParseString(source string) error
// ParseCopyString makes a copy of string and parse it.
// This method is safe to parse immutable strings.
ParseCopyString(source string) error
// ParseStr is a legacy version of ParseString.
// DEPRECATED: use ParseString instead.
ParseStr(source string) error
// ParseCopyStr is a legacy version of ParseCopyString.
// DEPRECATED: use ParseCopyString instead.
ParseCopyStr(source string) error
// ParseFile reads file contents and parse it.
ParseFile(path string) error
// ParseReader takes source from r and parse it.
ParseReader(r io.Reader) error
// Root returns first root node.
Root() *Node
// RootByIndex returns root node by given index. If index overflows count of root nodes, the NULL node will return.
RootByIndex(idx int) *Node
// RootTop returns last root node.
RootTop() *Node
// Each applies closure to each root node.
Each(fn func(idx int, fn *Node))
// Exists checks if root node contains a child with given key.
// The NULL node will return if node doesn't exist.
Exists(key string) bool
// Get returns node by given keys.
Get(keys ...string) *Node
// GetObject looks and get object node by given keys.
GetObject(keys ...string) *Node
// GetArray looks and get array node by given keys.
GetArray(keys ...string) *Node
// GetBytes looks and get bytes value by given keys.
GetBytes(keys ...string) []byte
// GetString looks and get string value by given keys.
GetString(keys ...string) string
// GetBool looks and get bool value by given keys.
GetBool(keys ...string) bool
// GetFloat looks and get float value by given keys.
GetFloat(keys ...string) (float64, error)
// GetInt looks and get integer value by given keys.
GetInt(keys ...string) (int64, error)
// GetUint looks and get unsigned integer value by given keys.
GetUint(keys ...string) (uint64, error)
// GetPS returns node by given path and separator.
GetPS(path, separator string) *Node
// GetObjectPS looks and get object node by given path and separator.
GetObjectPS(path, separator string) *Node
// GetArrayPS looks and get array node by given path and separator.
GetArrayPS(path, separator string) *Node
// GetBytesPS looks and get bytes value by given path and separator.
GetBytesPS(path, separator string) []byte
// GetStringPS looks and get string value by given path and separator.
GetStringPS(path, separator string) string
// GetBoolPS looks and get bool value by given path and separator.
GetBoolPS(path, separator string) bool
// GetFloatPS looks and get float value by given path and separator.
GetFloatPS(path, separator string) (float64, error)
// GetIntPS looks and get integer value by given path and separator.
GetIntPS(path, separator string) (int64, error)
// GetUintPS looks and get unsigned integer value by given path and separator.
GetUintPS(path, separator string) (uint64, error)
// Dot looks and get node by given path and "." separator.
Dot(path string) *Node
// DotObject looks and get object node by given path and "." separator.
DotObject(path string) *Node
// DotArray looks and get array node by given path and "." separator.
DotArray(path string) *Node
// DotBytes looks and get bytes value by given path and "." separator.
DotBytes(path string) []byte
// DotString looks and get string value by given path and "." separator.
DotString(path string) string
// DotBool looks and get bool value by given path and "." separator.
DotBool(path string) bool
// DotFloat looks and get float value by given path and "." separator.
DotFloat(path string) (float64, error)
// DotInt looks and get integer value by given path and "." separator.
DotInt(path string) (int64, error)
// DotUint looks and get unsigned integer value by given path and "." separator.
DotUint(path string) (uint64, error)
// KeepPtr guarantees that vector object wouldn't be collected by GC.
KeepPtr()
// Beautify formats first root node in human-readable representation to w.
Beautify(w io.Writer) error
// Marshal serializes first root node to w.
Marshal(w io.Writer) error
// ErrorOffset returns last error offset.
ErrorOffset() int
// Prealloc prepares space for further parse.
Prealloc(size uint)
// Reset vector data.
Reset()
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node object.
func (*Node) AcquireChild ¶ added in v1.2.7
AcquireChild allocates new child of current node and return it with index.
func (*Node) AcquireChildWithType ¶ added in v1.2.7
AcquireChildWithType allocates new child of current node, set the type at once and return it with index.
func (*Node) Bytes ¶
Bytes returns value as bytes.
Allow only for [string, number, bool, attribute] types.
func (*Node) ChildrenIndices ¶ added in v1.2.3
ChildrenIndices returns list of indices of children nodes.
func (*Node) FirstChild ¶ added in v1.2.7
FirstChild returns first child node of node n. If node has no childs then non-empty null will return.
func (*Node) ForceBytes ¶
ForceBytes returns value as bytes independent of the type.
func (*Node) ForceString ¶
ForceString returns value as string independent of the type.
func (*Node) GetArrayPS ¶
GetArrayPS looks and get child array by given path and separator.
func (*Node) GetBytesPS ¶
GetBytesPS looks and get child bytes by given path and separator.
func (*Node) GetFloatPS ¶
GetFloatPS looks and get child float by given path and separator.
func (*Node) GetObjectPS ¶
GetObjectPS looks and get child object by given path and separator.
func (*Node) GetStringPS ¶
GetStringPS looks and get child string by given path and separator.
func (*Node) LastChild ¶ added in v1.2.7
LastChild returns last child node of node n. If node has no childs then non-empty null will return.
func (*Node) ReleaseChild ¶ added in v1.2.7
ReleaseChild return node back to vector ownes current node.
func (*Node) RemoveIf ¶ added in v1.2.3
RemoveIf deletes all children nodes satisfies condition cond.
type Type ¶
type Type int
Type represents Node type.
const ( // TypeUnk is a legacy version of TypeUnknown. // DEPRECATED: use TypeUnknown instead. TypeUnk Type = 0 // TypeObj is a legacy version of TypeObject. // DEPRECATED: use TypeObject instead. TypeObj Type = 1 // TypeArr is a legacy version of TypeArray. // DEPRECATED: use TypeArray instead. TypeArr Type = 3 // TypeStr is a legacy version of TypeString. // DEPRECATED: use TypeString instead. TypeStr Type = 4 // TypeNum is a legacy version of TypeNumber. // DEPRECATED: use TypeNumber instead. TypeNum Type = 5 // TypeAttr is a legacy version of TypeAttribute. // DEPRECATED: use TypeAttribute instead. TypeAttr Type = 7 )
Legacy types.
type Vector ¶
type Vector struct {
bitset.Bitset
// Nodes index.
Index Index
// External helper object.
Helper Helper
// contains filtered or unexported fields
}
Vector parser object.
func (*Vector) AcquireChild ¶ added in v1.2.7
AcquireChild allocates new node and marks it as a child of root node.
Similar to AcquireNode.
func (*Vector) AcquireChildWithType ¶ added in v1.2.7
AcquireChildWithType allocates new node, mark it as child of root and set type at once.
func (*Vector) AcquireNode ¶ added in v1.2.7
AcquireNode allocates new node on given depth and returns it with index.
func (*Vector) AcquireNodeWithType ¶ added in v1.2.7
AcquireNodeWithType allocates new node on given depth and returns it with index. Similar to AcquireNode but sets node's type at once.
func (*Vector) Beautify ¶
Beautify formats first root node in human-readable representation.
Second and next roots must beautify manually by call Beautify method of each node.
func (*Vector) BufAppend ¶
BufAppend is a legacy version of Bufferize. DEPRECATED: use Bufferize instead.
func (*Vector) BufAppendByte ¶
BufAppendByte is a legacy version of BufferizeByte. DEPRECATED: use BufferizeByte instead.
func (*Vector) BufAppendFloat ¶
BufAppendFloat is a legacy version of BufferizeFloat. DEPRECATED: use BufferizeFloat instead.
func (*Vector) BufAppendFloatTune ¶
BufAppendFloatTune is a legacy version of BufferizeFloatTune. DEPRECATED: use BufferizeFloatTune instead.
func (*Vector) BufAppendInt ¶
BufAppendInt is a legacy version of BufferizeInt. DEPRECATED: use BufferizeInt instead.
func (*Vector) BufAppendStr ¶
BufAppendStr is a legacy version of BufferizeString. DEPRECATED: use BufferizeString instead.
func (*Vector) BufAppendUint ¶
BufAppendUint is a legacy version of BufferizeUint. DEPRECATED: use BufferizeUint instead.
func (*Vector) BufReplaceWith ¶ added in v1.2.7
BufReplaceWith replaces buffer with b. Use with caution! Buffer replacing may break copy-versions of parsing methods.
func (*Vector) BufUpdateWith ¶
BufUpdateWith is a legacy version of BufReplaceWith. DEPRECATED: use BufReplaceWith instead.
func (*Vector) Bufferize ¶ added in v1.2.7
Bufferize appends b to internal buffer and returns buffered value.
func (*Vector) BufferizeByte ¶ added in v1.2.7
BufferizeByte appends b to internal buffer and returns buffered value.
func (*Vector) BufferizeFloat ¶ added in v1.2.7
BufferizeFloat appends unsigned integer to internal buffer and returns buffered value.
func (*Vector) BufferizeFloatTune ¶ added in v1.2.7
BufferizeFloatTune appends float to internal buffer and returns buffered value.
func (*Vector) BufferizeInt ¶ added in v1.2.7
BufferizeInt appends integer to internal buffer and returns buffered value.
func (*Vector) BufferizeString ¶ added in v1.2.7
BufferizeString appends string to internal buffer and returns buffered value.
func (*Vector) BufferizeUint ¶ added in v1.2.7
BufferizeUint appends unsigned integer to internal buffer and returns buffered value.
func (*Vector) ErrorOffset ¶
ErrorOffset returns last error offset.
func (*Vector) ForgetFrom ¶
ForgetFrom forgets nodes from given position to the end of the array.
func (*Vector) GetArrayPS ¶
GetArrayPS looks and get array by given path and separator.
func (*Vector) GetBytesPS ¶
GetBytesPS looks and get bytes by given path and separator.
func (*Vector) GetChild ¶
GetChild is a legacy version of AcquireChild. DEPRECATED: use AcquireChild instead.
func (*Vector) GetChildWT ¶
GetChildWT is a legacy version of AcquireChildWithType. DEPRECATED: use AcquireChildWithType instead.
func (*Vector) GetFloatPS ¶
GetFloatPS looks and get float by given path and separator.
func (*Vector) GetNode ¶
GetNode is a legacy version of AcquireNode. DEPRECATED: use AcquireNode instead.
func (*Vector) GetNodeWT ¶
GetNodeWT is a legacy version of AcquireNodeWithType. DEPRECATED: use AcquireNodeWithType instead.
func (*Vector) GetObjectPS ¶
GetObjectPS looks and get object by given path and separator.
func (*Vector) GetStringPS ¶
GetStringPS looks and get string by given path and separator.
func (*Vector) KeepPtr ¶
func (vec *Vector) KeepPtr()
KeepPtr guarantees that vector object wouldn't be collected by GC.
Typically, vector objects uses together with pools and GC doesn't collect them. But for cases like vec := &Vector{...} node := vec.Get("foo", "bar") <- here GC may collect vec fmt.Println(node.String()) <- invalid operation due to vec already has been collected vec.KeepPtr() <- just call me to avoid that trouble
func (*Vector) Marshal ¶ added in v1.2.4
Marshal serializes first root node.
Second and next roots must beautify manually by call Marshal method of each node.
func (*Vector) ParseCopyStr ¶
ParseCopyStr is a legacy version of ParseCopyString. DEPRECATED: use ParseCopyString instead.
func (*Vector) ParseCopyString ¶ added in v1.2.7
ParseCopyString copies source string and parse it.
func (*Vector) ParseReader ¶ added in v1.2.7
ParseReader reads source from r and parse it.
func (*Vector) ParseStr ¶
ParseStr is a legacy version of ParseString. DEPRECATED: use ParseString instead.
func (*Vector) ParseString ¶ added in v1.2.7
ParseString parses source string.
func (*Vector) PutNode ¶
PutNode is a legacy version of ReleaseNode. DEPRECATED: use ReleaseNode instead.
func (*Vector) ReadRuneAt ¶ added in v1.2.7
ReadRuneAt returns rune at position i. Please note, it's your responsibility to specify right position `i`.
func (*Vector) ReleaseNode ¶ added in v1.2.7
ReleaseNode returns node back to the vector.
func (*Vector) RootByIndex ¶
RootByIndex returns root node by given index.
For cases when one vector instance uses for parse many sources.
func (*Vector) SetErrOffset ¶
SetErrOffset sets error offset.
func (*Vector) Src ¶
Src returns raw source bytes.
Please note, source bytes may be "corrupt" when unescaped.