1 write to Green
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNode.cs (1)
38Green = 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)
23_count = CountNodes(node.Green); 131var green = node.Green; 227GreenNode? green = node.Green; 306var 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)
32var separator = nodes[0].Green.CreateSeparator(nodes[0]); 153var green = node.Green.GetRequiredSlot(index); 432nodesToInsertWithSeparators.Add(item.Green.CreateSeparator(item)); 444nodesToInsertWithSeparators.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)
32case 1: return nodes[0].Green; 33case 2: return Syntax.InternalSyntax.SyntaxList.List(nodes[0].Green, nodes[1].Green); 34case 3: return Syntax.InternalSyntax.SyntaxList.List(nodes[0].Green, nodes[1].Green, nodes[2].Green); 39copy[i].Value = nodes[i].Green; 351var 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)
35RoslynDebug.Assert(parent?.Green.IsList != true, "list cannot be a parent"); 60public int RawKind => Green.RawKind; 62protected string KindText => Green.KindText; 73internal int EndPosition => Position + Green.FullWidth; 80internal bool IsList => this.Green.IsList; 85public TextSpan FullSpan => new TextSpan(this.Position, this.Green.FullWidth); 87internal int SlotCount => this.Green.SlotCount; 98var width = this.Green.FullWidth; 101var precedingWidth = this.Green.GetLeadingTriviaWidth(); 106width -= this.Green.GetTrailingTriviaWidth(); 119public int SpanStart => Position + Green.GetLeadingTriviaWidth(); 127internal int Width => this.Green.Width; 134internal int FullWidth => this.Green.FullWidth; 143var green = this.Green.GetSlot(slot); 161var green = this.Green.GetSlot(0); 178var green = this.Green.GetSlot(slot); 196var green = this.Green.GetSlot(0); 220var green = this.Green.GetRequiredSlot(slot); 240var green = this.Green.GetRequiredSlot(1); 266var greenChild = this.Green.GetRequiredSlot(index); 293return this.Green.ToString(); 303return this.Green.ToFullString(); 311this.Green.WriteTo(writer, leading: true, trailing: true); 329var writer = SourceTextWriter.Create(encoding, checksumAlgorithm, this.Green.FullWidth); 349return this.Green.IsEquivalentTo(other.Green); 367=> this.Green != null && this.Green == other?.Green; 379return this.Green.IsMissing; 404return this.Green.IsStructuredTrivia; 415return this.Green.ContainsStructuredTrivia && !this.Green.IsStructuredTrivia; 426return this.Green.ContainsSkippedText; 437return this.Green.ContainsDiagnostics; 444public bool ContainsDirectives => this.Green.ContainsDirectives; 446internal bool ContainsAttributes => this.Green.ContainsAttributes; 458stack.Push(this.Green); 592var item = this.Green.GetSlot(i); 625var green = this.Green; 653var green = this.Green; 1204get { return this.Green.ContainsAnnotations; } 1212return this.Green.HasAnnotations(annotationKind); 1220return this.Green.HasAnnotations(annotationKinds); 1228return this.Green.HasAnnotation(annotation); 1236return this.Green.GetAnnotations(annotationKind); 1244return this.Green.GetAnnotations(annotationKinds); 1249return this.Green.GetAnnotations(); 1342return this.Green.WithAdditionalAnnotationsGreen(annotations).CreateRed(); 1347return this.Green.WithoutAnnotationsGreen(annotations).CreateRed(); 1370var annotations = this.Green.GetAnnotations(); 1373return (T)(node.Green.WithAdditionalAnnotationsGreen(annotations)).CreateRed(); 1643return new Syntax.InternalSyntax.SyntaxDiagnosticInfoList(this.Green).Any( 1653var clone = (T)node.Green.CreateRed(null, 0);
Syntax\SyntaxNodeOrToken.cs (4)
47Debug.Assert(!node.Green.IsList, "node cannot be a list"); 55Debug.Assert(parent == null || !parent.Green.IsList, "parent cannot be a list"); 83return _nodeOrParent.Green.KindText; 129internal GreenNode? UnderlyingNode => _token ?? _nodeOrParent?.Green;
Syntax\SyntaxNodeOrTokenList.cs (2)
126get { return _node == null ? 0 : _node.Green.IsList ? _node.SlotCount : 1; } 150var green = _node.Green.GetRequiredSlot(index);
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
72this.Add(item.Green);
Syntax\SyntaxToken.cs (1)
31Debug.Assert(parent == null || !parent.Green.IsList, "list cannot be a parent");