mw-parser.utils
Utilities used in more than one namespace within the parser.
assert-type
(assert-type tree-fragment type)If tree-fragment is not a tree fragment of the expected type, throw an exception.
rule?
(rule? maybe-rule)Return true if the argument appears to be a parsed rule tree, else false.
search-tree
(search-tree tree tag)Return the first element of this tree which has this tag in a depth-first, left-to-right search
suitable-fragment?
(suitable-fragment? tree-fragment type)Return true if tree-fragment appears to be a tree fragment of the expected type.