/// <summary> /// Identifies and collects keywords from the grammar. /// </summary> private void CollectKeywords() { keywords = new HashSet <string>(); foreach (var f in rules.Values) { var vis = new KeywordVisitor(); vis.Visit((Expression)f.GetValue(null)); keywords.UnionWith(vis.Keywords); } if (inheritedGrammar != null) { keywords.UnionWith(inheritedGrammar.Keywords); } }
/// <summary> /// Identifies and collects keywords from the grammar. /// </summary> private void CollectKeywords() { keywords = new HashSet<string>(); foreach (var f in rules.Values) { var vis = new KeywordVisitor(); vis.Visit((Expression)f.GetValue(null)); keywords.UnionWith(vis.Keywords); } if (inheritedGrammar != null) { keywords.UnionWith(inheritedGrammar.Keywords); } }