10 Macros
See the definition of auxiliary-rule-sets in "Auxiliary Rule Sets" on page 414.
A symbol flags the beginning of an auxiliary rule set. For readability it is generally written as name:
rather than #"name"
. The name of the symbol is the same as the name of the pattern variable that is rewritten by this auxiliary rule set. All occurrences of this pattern variable in all rule sets are rewritten. A pattern variable can occur in the very auxiliary rule set that rewrites that pattern variable; this is how you write recursive rewrite rules, which greatly expand the power of pattern-matching.
When an auxiliary rule set's pattern variable occurs in a double question-mark pattern-keyword, the auxiliary rule set rewrites each property value in the sequence individually.
The order of auxiliary rule sets in a macro definition is immaterial.
The ellipsis ...
in patterns and templates of an auxiliary rule set means exactly the same thing as the pattern variable that is rewritten by this auxiliary rule set. Using ellipsis instead of the pattern variable can make recursive rewrite rules more readable.
Generated with Harlequin WebMaker