public TranslateElementVisitor(XmlHighlightingDefinition def, Dictionary <XshdRuleSet, HighlightingRuleSet> ruleSetDict, IHighlightingDefinitionReferenceResolver resolver)
 {
     Debug.Assert(def != null);
     Debug.Assert(ruleSetDict != null);
     this.def           = def;
     this.ruleSetDict   = ruleSetDict;
     this.resolver      = resolver;
     reverseRuleSetDict = new Dictionary <HighlightingRuleSet, XshdRuleSet>();
     foreach (var pair in ruleSetDict)
     {
         reverseRuleSetDict.Add(pair.Value, pair.Key);
     }
 }
 public RegisterNamedElementsVisitor(XmlHighlightingDefinition def)
 {
     this.def = def;
 }