NAME
std/path/zz - ZuzuScript-flavoured path selectors.
SYNOPSIS
from std/path/zz import ZZPath;
let data := { users: [ { name: "Ada" } ] };
say( ( new ZZPath( path: "/users/#0/name" ) ).first(data) );
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module provides the public ZZPath class. It currently reuses the ZPath traversal, parser, lexer, assignment, and reference machinery while routing expression operators through std/path/zz/operators and expression functions through std/path/zz/functions.
EXPORTS
Classes
ZZEvaluatorEvaluator class that supplies ZZPath operators and functions.
evaluator.operator_definitions()Parameters: none. Returns:
Array. Returns ZZPath operator definitions.evaluator.function_definitions()Parameters: none. Returns:
Array. Returns ZZPath function definitions.
ZZPath({ path: String })Constructs a ZZPath query object. Returns:
ZZPath. Inherits the public query, assignment, and reference methods fromZPath.path.get_evaluator()Parameters: none. Returns:
ZZEvaluator. Returns the evaluator used for this path.node.find(path)ZZPathinherits fromZPath, so aZZPathobject can be passed tostd/path/z/nodeNode.find().
COPYRIGHT AND LICENCE
std/path/zz 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.