Expand description
Validate triggers, which are parts of the script that specify yes or no conditions.
Structs§
Enums§
- Part
- A part in a token chain
- Trigger
- A description of the constraints on the right-hand side of a given trigger. In other words, how it can be used.
Functions§
- is_
character_ token - match_
trigger_ 🔒bv - Takes a
Triggerand a trigger field, and validates that the constraints specified by theTriggerhold. - match_
trigger_ 🔒fields - Implementation of the
Trigger::Blockvariant and its friends. It takes a list of known fields and their ownTriggervalidators, and checks that the givenblockcontains only fields from that list and validates them. - partition
- This function partitions the input token into parts separated by
.. Each part may contain either a token or a token-argument pair when using the()-syntax, e.g."prowess_diff(liege)". It does not validate the tokens or arguments, but simply parses and detects any syntactical errors. - scope_
trigger - Look up a trigger token that evaluates to a trigger value.
- trigger_
comparevalue - This function checks if the trigger is one that can be used at the end of a scope chain on the right-hand side of a comparator.
- validate_
argument - Validate that the argument passed through is valid, either being of a complex trigger compare value, or a scope prefix.
- validate_
argument_ 🔒internal - validate_
argument_ scope - Validate for scope and not trigger arguments
- validate_
inscopes - validate_
prefix - Validate a
prefix:valueconstruct in a trigger. - validate_
target - Just like
validate_target_ok_this, but warns if the target is a literalthisbecause that is usually a mistake. - validate_
target_ ok_ this - Validate that
tokenis valid as the right-hand side of a field. - validate_
trigger - The standard interface to trigger validation. Validates a trigger in the given
ScopeContext. - validate_
trigger_ internal - The interface to trigger validation when
validate_triggeris too limited. - validate_
trigger_ key_ bv - Validate a trigger given its key and argument. It is like
validate_trigger_internalexcept that all special cases are assumed to have been handled. This is the interface used for theswitcheffect, where the key and argument are not together in the script. - validate_
trigger_ max_ sev - Like
validate_triggerbut specifies a maximumSeverityfor the reports emitted by this validation. Used to validate triggers in item definitions that don’t warrant theErrorlevel. - validate_
trigger_ rhs - warn_
not_ first