1 write to Green
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNode.cs (1)
37Green = green;
88 references to Green
Microsoft.CodeAnalysis (88)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (3)
119syntaxHelper.AddAliases(compilationUnit.Green, globalAliases, global: true); 197syntaxHelper.AddAliases(compilationUnit.Green, localAliases, global: false); 223syntaxHelper.AddAliases(namespaceBlock.Green, localAliases, global: false);
Syntax\ChildSyntaxList.cs (4)
22_count = CountNodes(node.Green); 130var green = node.Green; 226GreenNode? green = node.Green; 305var green = node.Green;
Syntax\ChildSyntaxList.Enumerator.cs (1)
36_count = CountNodes(node.Green);
Syntax\InternalSyntax\GreenNodeExtensions.cs (2)
12ToGreenList<T>(node.Green) : 19new SeparatedSyntaxList<T>(ToGreenList<T>(node.Green)) :
Syntax\SeparatedSyntaxList.cs (4)
31var separator = nodes[0].Green.CreateSeparator(nodes[0]); 152var green = node.Green.GetRequiredSlot(index); 431nodesToInsertWithSeparators.Add(item.Green.CreateSeparator(item)); 443nodesToInsertWithSeparators.Add(node.Green.CreateSeparator(node)); // separator
Syntax\SyntaxList.SeparatedWithManyChildren.cs (1)
52&& (valueIndex >= Green.SlotCount - 2 || GetCachedSlot(valueIndex + 2) is { }))
Syntax\SyntaxList`1.cs (8)
31case 1: return nodes[0].Green; 32case 2: return Syntax.InternalSyntax.SyntaxList.List(nodes[0].Green, nodes[1].Green); 33case 3: return Syntax.InternalSyntax.SyntaxList.List(nodes[0].Green, nodes[1].Green, nodes[2].Green); 38copy[i].Value = nodes[i].Green; 350var newGreen = GreenNode.CreateList(items, static n => n.Green);
Syntax\SyntaxListBuilder.cs (3)
27AddInternal(item.Green); 59_nodes[j].Value = items[i].Green; 94_nodes[dst].Value = list.ItemInternal(i)!.Green;
Syntax\SyntaxNode.cs (54)
34RoslynDebug.Assert(parent?.Green.IsList != true, "list cannot be a parent"); 59public int RawKind => Green.RawKind; 61protected string KindText => Green.KindText; 72internal int EndPosition => Position + Green.FullWidth; 79internal bool IsList => this.Green.IsList; 84public TextSpan FullSpan => new TextSpan(this.Position, this.Green.FullWidth); 86internal int SlotCount => this.Green.SlotCount; 97var width = this.Green.FullWidth; 100var precedingWidth = this.Green.GetLeadingTriviaWidth(); 105width -= this.Green.GetTrailingTriviaWidth(); 118public int SpanStart => Position + Green.GetLeadingTriviaWidth(); 126internal int Width => this.Green.Width; 133internal int FullWidth => this.Green.FullWidth; 142var green = this.Green.GetSlot(slot); 160var green = this.Green.GetSlot(0); 177var green = this.Green.GetSlot(slot); 195var green = this.Green.GetSlot(0); 219var green = this.Green.GetRequiredSlot(slot); 239var green = this.Green.GetRequiredSlot(1); 265var greenChild = this.Green.GetRequiredSlot(index); 292return this.Green.ToString(); 302return this.Green.ToFullString(); 310this.Green.WriteTo(writer, leading: true, trailing: true); 328var writer = SourceTextWriter.Create(encoding, checksumAlgorithm, this.Green.FullWidth); 348return this.Green.IsEquivalentTo(other.Green); 366=> this.Green != null && this.Green == other?.Green; 378return this.Green.IsMissing; 403return this.Green.IsStructuredTrivia; 414return this.Green.ContainsStructuredTrivia && !this.Green.IsStructuredTrivia; 425return this.Green.ContainsSkippedText; 436return this.Green.ContainsDiagnostics; 443public bool ContainsDirectives => this.Green.ContainsDirectives; 445internal bool ContainsAttributes => this.Green.ContainsAttributes; 457stack.Push(this.Green); 591var item = this.Green.GetSlot(i); 624var green = this.Green; 652var green = this.Green; 1203get { return this.Green.ContainsAnnotations; } 1211return this.Green.HasAnnotations(annotationKind); 1219return this.Green.HasAnnotations(annotationKinds); 1227return this.Green.HasAnnotation(annotation); 1235return this.Green.GetAnnotations(annotationKind); 1243return this.Green.GetAnnotations(annotationKinds); 1248return this.Green.GetAnnotations(); 1341return this.Green.WithAdditionalAnnotationsGreen(annotations).CreateRed(); 1346return this.Green.WithoutAnnotationsGreen(annotations).CreateRed(); 1369var annotations = this.Green.GetAnnotations(); 1372return (T)(node.Green.WithAdditionalAnnotationsGreen(annotations)).CreateRed(); 1642return new Syntax.InternalSyntax.SyntaxDiagnosticInfoList(this.Green).Any( 1652var clone = (T)node.Green.CreateRed(null, 0);
Syntax\SyntaxNodeOrToken.cs (4)
46Debug.Assert(!node.Green.IsList, "node cannot be a list"); 54Debug.Assert(parent == null || !parent.Green.IsList, "parent cannot be a list"); 82return _nodeOrParent.Green.KindText; 128internal GreenNode? UnderlyingNode => _token ?? _nodeOrParent?.Green;
Syntax\SyntaxNodeOrTokenList.cs (2)
125get { return _node == null ? 0 : _node.Green.IsList ? _node.SlotCount : 1; } 149var green = _node.Green.GetRequiredSlot(index);
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
72this.Add(item.Green);
Syntax\SyntaxToken.cs (1)
30Debug.Assert(parent == null || !parent.Green.IsList, "list cannot be a parent");