NAME
std/path/z/context - Evaluation context used by std/path/z.
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module provides the pure-Zuzu evaluation context used by ZPath.
EXPORTS
Classes
Ctx({ root, nodeset?, parentset?, meta? })Constructs a ZPath evaluation context. Returns:
Ctx. Wrapsrootas astd/path/z/nodeNodeand stores the active node sets.ctx.with_nodeset(ns, ps)Parameters:
nsis the next node set andpsis the parent set. Returns:Ctx. Returns a copy of the context with different node sets.ctx.nested(extras?)Parameters:
extrasis optional metadata. Returns:Ctx. Returns a nested context with incremented metadata level.ctx.root()Parameters: none. Returns:
Node. Returns the root node.ctx.nodeset()Parameters: none. Returns:
Array. Returns the current node set.ctx.parentset()Parameters: none. Returns:
Arrayornull. Returns the parent node set.ctx.meta()Parameters: none. Returns:
Dict. Returns context metadata.
COPYRIGHT AND LICENCE
std/path/z/context is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.