Skip to main content

Expression-Syntax

Learn about how the syntax of expressions is composed

📄️ Predicate Decision

While it might not be immediately obvious how specific predicate types are decided upon, based on nothing but the aforementioned syllable matching units, the process is rather simple. All existing target identifiers are tested against, which results in a list of matches; the match shortest in length is considered to be the final result. This list of matches is displayed to the user by the means of command completion, while the final result preview is rendered in the action-bar.

📄️ Exact Mode

Exact mode is not a predicate by itself, but rather an operator which can be prepended to any other expression. Once entered, all enchantments and potion-effects need to be matched against by the contained predicates; each predicate removes it's match from the respective list, and at the end, the lists have to be empty for the whole exact expression to be considered a match. While, for simple expressions, prepending a single predicate may suffice, complex expressions can be prepended by making use of parentheses, since this operator is evaluated before various logical junctions.