NAME
std/path/z/operators - Operator definitions for ZPath.
IMPLEMENTATION SUPPORT
This module is supported by all implementations of ZuzuScript.
DESCRIPTION
This module defines the base ZPath operator model and the standard operator table used by std/path/z.
EXPORTS
Traits
EvalHelpersShared helpers for operator and function definitions.
helper.wrap(value)Parameters:
valueis any value. Returns:Array. Wrapsvalueas a one-item ZPath node array.helper.wrap_for_array(value)Parameters:
valueis any value. Returns:Node. Wrapsvalueas a ZPath node for array results.
Classes
Operator({ spelling: String, kind: String, precedence: Number, ... })Constructs an operator definition. Returns:
Operator.operator.is_unary(),operator.is_binary()Parameters: none. Returns:
Boolean. Reports whether the operator is unary or binary.operator.requires_whitespace()Parameters: none. Returns:
Boolean. Reports whether the lexer requires whitespace around the operator.operator.lexer_should_ignore()Parameters: none. Returns:
Boolean. Reports whether the lexer should ignore this operator definition.operator.is_right_associative()Parameters: none. Returns:
Boolean. Reports whether the operator is right associative.operator.char_length()Parameters: none. Returns:
Number. Returns the operator spelling length.operator.precedence_is(lvl)Parameters:
lvlis a precedence level. Returns:Boolean. Returns true when the operator has that precedence.
Constants
STANDARD_OPERATORSType:
Array. Standard ZPath operator definitions.
COPYRIGHT AND LICENCE
std/path/z/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.