Match Tag Expression

From HLKitWiki
Jump to: navigation, search

Context: HL KitKit Reference … Tag Expression Types 

The role of the Match tag expression is to determine whether a thing should be included in a set of elements for processing in some way. For example, an Eval script on a component will use a Match tag expression to identify the subsets of things to which the script should be applied. The implications of the Match tag expression are clear and simple, since the thing is either included for processing or not.

The Match tag expression is always applied against the thing that may be processed. The tag expression is compared against all of the tags possessed by the thing. Since tags possess a fixed set of tags, a given tag will always either satisfy a Match tag expression or not. If the tag expression is satisfied, the thing is included in the processing it is being considered for. Otherwise, the thing is omitted from processing.