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