NAME
std/path/zz/operators - Operator definitions for ZZPath expressions.
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module extends the base ZPath operator model with ZuzuScript-flavoured expression operators.
EXPORTS
Classes
OperatorZZPath operator class extending
std/path/z/operatorsOperator.
Functions
string_operand(ev, ctx, expr),string_operands(ev, ctx, left, right)Parameters: evaluator, context, and expression AST nodes. Returns:
StringorArray. Evaluates one or two operands as strings.first_eval_value(values),primitive_eval_value(values)Parameters:
valuesis an evaluated node array. Returns: value. Extracts the first or primitive value used by ZZPath operators.collection_operand(ev, ctx, expr)Parameters: evaluator, context, and expression AST node. Returns: collection value. Evaluates an operand for collection operators.
builtin_can(value, method_name)Parameters:
valueis any value andmethod_nameis a method name. Returns:Boolean. Tests whether built-in values support a method.
Constants
STANDARD_OPERATORSType:
Array. Complete ZZPath operator definition table.logical_negation,logical_and,logical_nand,logical_xor,logical_orType:
Function. Logical operator implementations.numeric_power,numeric_multiplication,numeric_division,numeric_modulus,numeric_addition,numeric_subtraction,numeric_equality,numeric_inequality,numeric_less_than,numeric_greater_than,numeric_less_than_or_equal,numeric_greater_than_or_equal,numeric_compareType:
Function. Numeric operator implementations.string_concatenation,string_equality,string_inequality,string_greater_than,string_greater_than_or_equal,string_less_than,string_less_than_or_equal,string_compare,string_equality_insensitive,string_inequality_insensitive,string_greater_than_insensitive,string_greater_than_or_equal_insensitive,string_less_than_insensitive,string_less_than_or_equal_insensitive,string_compare_insensitiveType:
Function. String operator implementations.regexp_match,bitwise_and,bitwise_xor,bitwise_or,set_union,set_intersection,set_difference,collection_membership,collection_non_membership,set_subsetof,set_supersetof,set_equivalentof,type_aware_equality,type_aware_inequality,object_canType:
Function. Regular expression, bitwise, collection, type-aware, and object capability operator implementations.
COPYRIGHT AND LICENCE
std/path/zz/operators 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.