std/path/zz/operators

Standard Library documentation

Operator definitions for ZZPath expressions.

Module

Name
std/path/zz/operators
Area
Standard Library
Source
modules/std/path/zz/operators.zzm

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

  • Operator

    ZZPath operator class extending std/path/z/operators Operator.

Functions

  • string_operand(ev, ctx, expr), string_operands(ev, ctx, left, right)

    Parameters: evaluator, context, and expression AST nodes. Returns: String or Array. Evaluates one or two operands as strings.

  • first_eval_value(values), primitive_eval_value(values)

    Parameters: values is 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: value is any value and method_name is a method name. Returns: Boolean. Tests whether built-in values support a method.

Constants

  • STANDARD_OPERATORS

    Type: Array. Complete ZZPath operator definition table.

  • logical_negation, logical_and, logical_nand, logical_xor, logical_or

    Type: 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_compare

    Type: 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_insensitive

    Type: 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_can

    Type: 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.