protected void RegisterChildNodes <T>(out SeparatedSyntaxList <T> nodes, SeparatedSyntaxList <T> values) where T : SyntaxNodeBase { nodes = values; foreach (var childNode in values.GetWithSeparators()) { SourceRange = SourceRange.Union(SourceRange, childNode.SourceRange); FullSourceRange = SourceRange.Union(FullSourceRange, childNode.FullSourceRange); ChildNodes.Add(childNode); childNode.Parent = this; } }
protected void RegisterChildNode <T>(out T node, T value) where T : SyntaxNodeBase { if (value == null) { node = null; return; } SourceRange = SourceRange.Union(SourceRange, value.SourceRange); FullSourceRange = SourceRange.Union(FullSourceRange, value.FullSourceRange); node = value; ChildNodes.Add(node); node.Parent = this; }