Пример #1
0
 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;
     }
 }
Пример #2
0
 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;
 }
Пример #3
0
 public abstract TextSpan GetSourceTextSpan(SourceRange range);