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