traverseRules method
Traverses all rules in the theme using the visitor pattern.
Applies the given visitor to all rules in the theme hierarchy, enabling operations like analysis, modification, or extraction.
visitor The visitor to apply to each rule
Implementation
void traverseRules(RuleVisitor visitor) {
for (var rule in rulesList) {
rule.apply(visitor);
}
}