1 type derived from GreenNode
Microsoft.CodeAnalysis (1)
Syntax\InternalSyntax\SyntaxList.cs (1)
10
internal abstract partial class SyntaxList :
GreenNode
407 references to GreenNode
Microsoft.CodeAnalysis (391)
SourceGeneration\ISyntaxHelper.cs (2)
32
void AddAliases(
GreenNode
node, ArrayBuilder<(string aliasName, string symbolName)> aliases, bool global);
57
public abstract void AddAliases(
GreenNode
node, ArrayBuilder<(string aliasName, string symbolName)> aliases, bool global);
Syntax\ChildSyntaxList.cs (9)
36
internal static int CountNodes(
GreenNode
green)
42
var
child = green.GetSlot(i);
81
private static int Occupancy(
GreenNode
green)
129
GreenNode
? greenChild;
130
var
green = node.Green;
226
GreenNode
? green = node.Green;
239
GreenNode
? greenChild = green.GetSlot(slot);
304
GreenNode
? greenChild;
305
var
green = node.Green;
Syntax\GreenNode.cs (60)
42
private static readonly ConditionalWeakTable<
GreenNode
, DiagnosticInfo[]> s_diagnosticsTable =
43
new ConditionalWeakTable<
GreenNode
, DiagnosticInfo[]>();
45
private static readonly ConditionalWeakTable<
GreenNode
, SyntaxAnnotation[]> s_annotationsTable =
46
new ConditionalWeakTable<
GreenNode
, SyntaxAnnotation[]>();
114
protected void AdjustFlagsAndWidth(
GreenNode
node)
164
internal abstract
GreenNode
? GetSlot(int index);
166
internal
GreenNode
GetRequiredSlot(int index)
168
var
node = GetSlot(index);
189
var
child = this.GetSlot(i);
230
var
child = GetSlot(i);
586
internal abstract
GreenNode
SetAnnotations(SyntaxAnnotation[]? annotations);
605
internal abstract
GreenNode
SetDiagnostics(DiagnosticInfo[]? diagnostics);
634
var stack = ArrayBuilder<(
GreenNode
node, bool leading, bool trailing)>.GetInstance();
645
ArrayBuilder<(
GreenNode
node, bool leading, bool trailing)> stack)
650
var
currentNode = current.node;
671
var
child = currentNode.GetSlot(i);
683
private static int GetFirstNonNullChildIndex(
GreenNode
node)
689
var
child = node.GetSlot(firstIndex);
699
private static int GetLastNonNullChildIndex(
GreenNode
node)
705
var
child = node.GetSlot(lastIndex);
732
public virtual
GreenNode
? GetLeadingTriviaCore() { return null; }
733
public virtual
GreenNode
? GetTrailingTriviaCore() { return null; }
735
public virtual
GreenNode
WithLeadingTrivia(
GreenNode
? trivia)
740
public virtual
GreenNode
WithTrailingTrivia(
GreenNode
? trivia)
745
internal
GreenNode
? GetFirstTerminal()
747
GreenNode
? node = this;
751
GreenNode
? firstChild = null;
754
var
child = node.GetSlot(i);
771
internal
GreenNode
? GetLastTerminal()
773
GreenNode
? node = this;
777
GreenNode
? lastChild = null;
780
var
child = node.GetSlot(i);
797
internal
GreenNode
? GetLastNonmissingTerminal()
799
GreenNode
? node = this;
803
GreenNode
? nonmissingChild = null;
806
var
child = node.GetSlot(i);
825
public virtual bool IsEquivalentTo([NotNullWhen(true)]
GreenNode
? other)
840
private static bool EquivalentToInternal(
GreenNode
node1,
GreenNode
node2)
876
var
node1Child = node1.GetSlot(i);
877
var
node2Child = node2.GetSlot(i);
902
public static
GreenNode
? CreateList<TFrom>(IEnumerable<TFrom>? enumerable, Func<TFrom,
GreenNode
> select)
911
public static
GreenNode
? CreateList<TFrom>(List<TFrom> list, Func<TFrom,
GreenNode
> select)
925
var array = new ArrayElement<
GreenNode
>[list.Count];
933
public static
GreenNode
? CreateList<TFrom>(IReadOnlyList<TFrom> list, Func<TFrom,
GreenNode
> select)
947
var array = new ArrayElement<
GreenNode
>[list.Count];
973
this.SlotCount <=
GreenNode
.MaxCachedChildNum;
985
var
child = GetSlot(i);
995
internal bool IsCacheEquivalent(int kind, NodeFlags flags,
GreenNode
? child1)
1005
internal bool IsCacheEquivalent(int kind, NodeFlags flags,
GreenNode
? child1,
GreenNode
? child2)
1016
internal bool IsCacheEquivalent(int kind, NodeFlags flags,
GreenNode
? child1,
GreenNode
? child2,
GreenNode
? child3)
1037
internal
GreenNode
AddError(DiagnosticInfo err)
Syntax\GreenNode.NodeEnumerable.cs (5)
14
public ref struct NodeEnumerable(
GreenNode
node)
16
private readonly
GreenNode
_node = node;
27
private
GreenNode
_current;
29
public Enumerator(
GreenNode
node)
39
public readonly
GreenNode
Current
Syntax\GreenNodeExtensions.cs (5)
14
public static TNode WithAnnotationsGreen<TNode>(this TNode node, IEnumerable<SyntaxAnnotation> annotations) where TNode :
GreenNode
44
public static TNode WithAdditionalAnnotationsGreen<TNode>(this TNode node, IEnumerable<SyntaxAnnotation>? annotations) where TNode :
GreenNode
75
public static TNode WithoutAnnotationsGreen<TNode>(this TNode node, IEnumerable<SyntaxAnnotation>? annotations) where TNode :
GreenNode
110
public static TNode WithDiagnosticsGreen<TNode>(this TNode node, DiagnosticInfo[]? diagnostics) where TNode :
GreenNode
115
public static TNode WithoutDiagnosticsGreen<TNode>(this TNode node) where TNode :
GreenNode
Syntax\InternalSyntax\ChildSyntaxList.cs (5)
9
private readonly
GreenNode
? _node;
12
internal ChildSyntaxList(
GreenNode
node)
45
private
GreenNode
[] Nodes
50
var result = new
GreenNode
[this.Count];
53
foreach (
var
n in this)
Syntax\InternalSyntax\ChildSyntaxList.Enumerator.cs (7)
11
private readonly
GreenNode
? _node;
13
private
GreenNode
? _list;
15
private
GreenNode
? _currentChild;
17
internal Enumerator(
GreenNode
? node)
53
var
child = _node.GetSlot(_childIndex);
59
if (child.RawKind ==
GreenNode
.ListKind)
89
public
GreenNode
Current
Syntax\InternalSyntax\ChildSyntaxList.Reversed.cs (5)
14
private readonly
GreenNode
? _node;
16
internal Reversed(
GreenNode
? node)
30
private
GreenNode
[] Nodes
35
var result = new List<
GreenNode
>();
36
foreach (
var
n in this)
Syntax\InternalSyntax\ChildSyntaxList.Reversed.Enumerator.cs (6)
13
private readonly
GreenNode
? _node;
15
private
GreenNode
? _list;
17
private
GreenNode
? _currentChild;
19
internal Enumerator(
GreenNode
? node)
56
var
child = _node.GetSlot(_childIndex);
91
public
GreenNode
Current
Syntax\InternalSyntax\GreenNodeExtensions.cs (4)
9
internal static SyntaxList<T> ToGreenList<T>(this SyntaxNode? node) where T :
GreenNode
16
internal static SeparatedSyntaxList<T> ToGreenSeparatedList<T>(this SyntaxNode? node) where T :
GreenNode
23
internal static SyntaxList<T> ToGreenList<T>(this
GreenNode
? node) where T :
GreenNode
Syntax\InternalSyntax\SeparatedSyntaxList.cs (10)
10
internal readonly struct SeparatedSyntaxList<TNode> : IEquatable<SeparatedSyntaxList<TNode>> where TNode :
GreenNode
12
private readonly SyntaxList<
GreenNode
> _list;
14
internal SeparatedSyntaxList(SyntaxList<
GreenNode
> list)
21
private static void Validate(SyntaxList<
GreenNode
> list)
25
var
item = list.GetRequiredItem(i);
37
internal
GreenNode
? Node => _list.Node;
68
public
GreenNode
? GetSeparator(int index)
73
public SyntaxList<
GreenNode
> GetWithSeparators()
103
public static implicit operator SeparatedSyntaxList<
GreenNode
>(SeparatedSyntaxList<TNode> list)
105
return new SeparatedSyntaxList<
GreenNode
>(list.GetWithSeparators());
Syntax\InternalSyntax\SeparatedSyntaxListBuilder.cs (4)
12
internal readonly struct SeparatedSyntaxListBuilder<TNode> where TNode :
GreenNode
47
public
GreenNode
? this[int index]
76
public void AddSeparator(
GreenNode
separatorToken)
106
: new SeparatedSyntaxList<TNode>(new SyntaxList<
GreenNode
>(_builder.ToListNode()));
Syntax\InternalSyntax\SyntaxDiagnosticInfoList.cs (12)
13
private readonly
GreenNode
_node;
15
internal SyntaxDiagnosticInfoList(
GreenNode
node)
41
internal readonly
GreenNode
Node;
45
internal NodeIteration(
GreenNode
node)
58
internal Enumerator(
GreenNode
node)
75
var
node = _stack[_count - 1].Node;
90
var
child = node.GetSlot(slotIndex);
108
private void PushNodeOrToken(
GreenNode
node)
120
private void PushToken(
GreenNode
token)
122
var
trailing = token.GetTrailingTriviaCore();
129
var
leading = token.GetLeadingTriviaCore();
136
private void Push(
GreenNode
node)
Syntax\InternalSyntax\SyntaxList.cs (27)
13
: base(
GreenNode
.ListKind)
18
: base(
GreenNode
.ListKind, diagnostics, annotations)
22
internal static
GreenNode
List(
GreenNode
child)
27
internal static WithTwoChildren List(
GreenNode
child0,
GreenNode
child1)
33
GreenNode
? cached = SyntaxNodeCache.TryGetNode(
GreenNode
.ListKind, child0, child1, out hash);
46
internal static WithThreeChildren List(
GreenNode
child0,
GreenNode
child1,
GreenNode
child2)
53
GreenNode
? cached = SyntaxNodeCache.TryGetNode(
GreenNode
.ListKind, child0, child1, child2, out hash);
66
internal static
GreenNode
List(
GreenNode
?[] nodes)
71
internal static
GreenNode
List(
GreenNode
?[] nodes, int count)
73
var array = new ArrayElement<
GreenNode
>[count];
76
var
node = nodes[i];
84
internal static SyntaxList List(ArrayElement<
GreenNode
>[] children)
98
internal abstract void CopyTo(ArrayElement<
GreenNode
>[] array, int offset);
100
internal static
GreenNode
? Concat(
GreenNode
? left,
GreenNode
? right)
118
var tmp = new ArrayElement<
GreenNode
>[left.SlotCount + right.SlotCount];
125
var tmp = new ArrayElement<
GreenNode
>[left.SlotCount + 1];
133
var tmp = new ArrayElement<
GreenNode
>[rightList.SlotCount + 1];
Syntax\InternalSyntax\SyntaxList.WithLotsOfChildren.cs (6)
16
internal WithLotsOfChildren(ArrayElement<
GreenNode
>[] children)
22
internal WithLotsOfChildren(DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations, ArrayElement<
GreenNode
>[] children, int[] childOffsets)
36
/// <param name="offset">The target offset. Must be between 0 and <see cref="
GreenNode
.FullWidth"/>.</param>
48
private static int[] CalculateOffsets(ArrayElement<
GreenNode
>[] children)
61
internal override
GreenNode
SetDiagnostics(DiagnosticInfo[]? errors)
66
internal override
GreenNode
SetAnnotations(SyntaxAnnotation[]? annotations)
Syntax\InternalSyntax\SyntaxList.WithManyChildren.cs (9)
14
internal readonly ArrayElement<
GreenNode
>[] children;
16
internal WithManyChildrenBase(ArrayElement<
GreenNode
>[] children)
22
internal WithManyChildrenBase(DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations, ArrayElement<
GreenNode
>[] children)
51
internal override
GreenNode
GetSlot(int index)
56
internal override void CopyTo(ArrayElement<
GreenNode
>[] array, int offset)
95
internal WithManyChildren(ArrayElement<
GreenNode
>[] children)
100
internal WithManyChildren(DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations, ArrayElement<
GreenNode
>[] children)
105
internal override
GreenNode
SetDiagnostics(DiagnosticInfo[]? errors)
110
internal override
GreenNode
SetAnnotations(SyntaxAnnotation[]? annotations)
Syntax\InternalSyntax\SyntaxList.WithThreeChildren.cs (13)
13
private readonly
GreenNode
_child0;
14
private readonly
GreenNode
_child1;
15
private readonly
GreenNode
_child2;
17
internal WithThreeChildren(
GreenNode
child0,
GreenNode
child1,
GreenNode
child2)
28
internal WithThreeChildren(DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations,
GreenNode
child0,
GreenNode
child1,
GreenNode
child2)
40
internal override
GreenNode
? GetSlot(int index)
55
internal override void CopyTo(ArrayElement<
GreenNode
>[] array, int offset)
67
internal override
GreenNode
SetDiagnostics(DiagnosticInfo[]? errors)
72
internal override
GreenNode
SetAnnotations(SyntaxAnnotation[]? annotations)
Syntax\InternalSyntax\SyntaxList.WithTwoChildren.cs (10)
13
private readonly
GreenNode
_child0;
14
private readonly
GreenNode
_child1;
16
internal WithTwoChildren(
GreenNode
child0,
GreenNode
child1)
25
internal WithTwoChildren(DiagnosticInfo[]? diagnostics, SyntaxAnnotation[]? annotations,
GreenNode
child0,
GreenNode
child1)
35
internal override
GreenNode
? GetSlot(int index)
48
internal override void CopyTo(ArrayElement<
GreenNode
>[] array, int offset)
59
internal override
GreenNode
SetDiagnostics(DiagnosticInfo[]? errors)
64
internal override
GreenNode
SetAnnotations(SyntaxAnnotation[]? annotations)
Syntax\InternalSyntax\SyntaxList`1.cs (12)
12
where TNode :
GreenNode
14
private readonly
GreenNode
? _node;
16
internal SyntaxList(
GreenNode
? node)
21
internal
GreenNode
? Node => _node;
64
internal
GreenNode
? ItemUntyped(int index)
67
var
node = this._node;
113
var
node = this._node;
128
internal void CopyTo(int offset, ArrayElement<
GreenNode
>[] array, int arrayOffset, int count)
161
public SeparatedSyntaxList<TOther> AsSeparatedList<TOther>() where TOther :
GreenNode
171
public static implicit operator SyntaxList<TNode>(SyntaxList<
GreenNode
> nodes)
176
public static implicit operator SyntaxList<
GreenNode
>(SyntaxList<TNode> nodes)
178
return new SyntaxList<
GreenNode
>(nodes.Node);
Syntax\InternalSyntax\SyntaxList`1.Enumerator.cs (1)
7
internal partial struct SyntaxList<TNode> where TNode :
GreenNode
Syntax\InternalSyntax\SyntaxListBuilder.cs (18)
12
private ArrayElement<
GreenNode
?>[] _nodes;
17
_nodes = new ArrayElement<
GreenNode
?>[size];
30
public
GreenNode
? this[int index]
43
public void Add(
GreenNode
? item)
67
public void AddRange(
GreenNode
[] items)
72
public void AddRange(
GreenNode
[] items, int offset, int length)
96
public void AddRange(SyntaxList<
GreenNode
> list)
101
public void AddRange(SyntaxList<
GreenNode
> list, int offset, int length)
116
public void AddRange<TNode>(SyntaxList<TNode> list) where TNode :
GreenNode
121
public void AddRange<TNode>(SyntaxList<TNode> list, int offset, int length) where TNode :
GreenNode
123
this.AddRange(new SyntaxList<
GreenNode
>(list.Node), offset, length);
161
public
GreenNode
[] ToArray()
163
var array = new
GreenNode
[this.Count];
172
internal
GreenNode
? ToListNode()
185
var tmp = new ArrayElement<
GreenNode
>[this.Count];
191
public SyntaxList<
GreenNode
> ToList()
193
return new SyntaxList<
GreenNode
>(ToListNode());
196
public SyntaxList<TNode> ToList<TNode>() where TNode :
GreenNode
Syntax\InternalSyntax\SyntaxListBuilder`1.cs (4)
9
internal readonly struct SyntaxListBuilder<TNode> where TNode :
GreenNode
49
var
result = _builder[index];
100
public
GreenNode
? ToListNode()
120
public SyntaxList<TDerived> ToList<TDerived>() where TDerived :
GreenNode
Syntax\InternalSyntax\SyntaxListBuilderExtensions.cs (4)
9
public static SyntaxList<
GreenNode
> ToList(this SyntaxListBuilder? builder)
11
return ToList<
GreenNode
>(builder);
14
public static SyntaxList<TNode> ToList<TNode>(this SyntaxListBuilder? builder) where TNode :
GreenNode
18
return default(SyntaxList<
GreenNode
>);
Syntax\InternalSyntax\SyntaxListPool.cs (5)
46
internal SyntaxListBuilder<TNode> Allocate<TNode>() where TNode :
GreenNode
51
internal SeparatedSyntaxListBuilder<TNode> AllocateSeparated<TNode>() where TNode :
GreenNode
56
internal void Free<TNode>(in SeparatedSyntaxListBuilder<TNode> item) where TNode :
GreenNode
88
where TNode :
GreenNode
99
where TNode :
GreenNode
Syntax\InternalSyntax\SyntaxNodeCache.cs (44)
90
internal static void NoteGreen(
GreenNode
_)
120
public readonly
GreenNode
? node;
122
internal Entry(int hash,
GreenNode
node)
131
internal static void AddNode(
GreenNode
node, int hash)
144
private static bool CanBeCached(
GreenNode
? child1)
149
private static bool CanBeCached(
GreenNode
? child1,
GreenNode
? child2)
154
private static bool CanBeCached(
GreenNode
? child1,
GreenNode
? child2,
GreenNode
? child3)
159
private static bool ChildInCache(
GreenNode
? child)
171
private static bool AllChildrenInCache(
GreenNode
node)
186
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1, out int hash)
191
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1,
GreenNode
.NodeFlags flags, out int hash)
214
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1,
GreenNode
? child2, out int hash)
219
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1,
GreenNode
? child2,
GreenNode
.NodeFlags flags, out int hash)
242
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1,
GreenNode
? child2,
GreenNode
? child3, out int hash)
247
internal static
GreenNode
? TryGetNode(int kind,
GreenNode
? child1,
GreenNode
? child2,
GreenNode
? child3,
GreenNode
.NodeFlags flags, out int hash)
270
public static
GreenNode
.NodeFlags GetDefaultNodeFlags()
272
return
GreenNode
.NodeFlags.IsNotMissing;
275
private static int GetCacheHash(int kind,
GreenNode
.NodeFlags flags,
GreenNode
? child1)
284
private static int GetCacheHash(int kind,
GreenNode
.NodeFlags flags,
GreenNode
? child1,
GreenNode
? child2)
301
private static int GetCacheHash(int kind,
GreenNode
.NodeFlags flags,
GreenNode
? child1,
GreenNode
? child2,
GreenNode
? child3)
Syntax\SeparatedSyntaxList.cs (1)
152
var
green = node.Green.GetRequiredSlot(index);
Syntax\SyntaxDiffer.cs (2)
24
private readonly HashSet<
GreenNode
> _nodeSimilaritySet = new HashSet<
GreenNode
>();
Syntax\SyntaxList`1.cs (4)
27
static
GreenNode
createGreenNode(ReadOnlySpan<TNode> nodes)
36
var copy = new ArrayElement<
GreenNode
>[nodes.Length];
350
var
newGreen =
GreenNode
.CreateList(items, static n => n.Green);
Syntax\SyntaxListBuilder.cs (6)
12
private ArrayElement<
GreenNode
?>[] _nodes;
17
_nodes = new ArrayElement<
GreenNode
?>[size];
30
internal void AddInternal(
GreenNode
item)
150
var tmp = new ArrayElement<
GreenNode
?>[size];
168
internal
GreenNode
? ToListNode()
181
var tmp = new ArrayElement<
GreenNode
>[this.Count];
Syntax\SyntaxListBuilderExtensions.cs (3)
21
var
listNode = builder?.ToListNode();
33
var
listNode = builder?.ToListNode();
44
var
listNode = builder?.ToListNode();
Syntax\SyntaxNode.cs (19)
31
internal SyntaxNode(
GreenNode
green, SyntaxNode? parent, int position)
45
internal SyntaxNode(
GreenNode
green, int position, SyntaxTree syntaxTree)
68
internal
GreenNode
Green { get; }
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);
456
var stack = PooledObjects.ArrayBuilder<
GreenNode
?>.GetInstance();
463
var
current = stack.Pop();
499
static bool triviaContainsMatch(
GreenNode
? triviaNode, int rawKind)
508
var
child = triviaNode.GetSlot(i);
591
var
item = this.Green.GetSlot(i);
624
var
green = this.Green;
633
var
greenChild = green.GetSlot(index);
652
var
green = this.Green;
663
var
greenChild = green.GetSlot(index);
Syntax\SyntaxNodeOrToken.cs (6)
32
private readonly
GreenNode
? _token;
52
internal SyntaxNodeOrToken(SyntaxNode? parent,
GreenNode
? token, int position, int index)
128
internal
GreenNode
? UnderlyingNode => _token ?? _nodeOrParent?.Green;
132
internal
GreenNode
RequiredUnderlyingNode
754
var
thisUnderlying = this.UnderlyingNode;
755
var
otherUnderlying = other.UnderlyingNode;
Syntax\SyntaxNodeOrTokenList.cs (6)
92
var copy = new ArrayElement<
GreenNode
>[nodesAndTokens.Length];
149
var
green = _node.Green.GetRequiredSlot(index);
277
internal void CopyTo(int offset,
GreenNode
?[] array, int arrayOffset, int count)
352
var
newGreen =
GreenNode
.CreateList(items, static n => n.RequiredUnderlyingNode)!;
357
new ArrayElement<
GreenNode
> {Value = newGreen}
Syntax\SyntaxNodeOrTokenListBuilder.cs (6)
13
private
GreenNode
?[] _nodes;
18
_nodes = new
GreenNode
?[size];
41
var
innerNode = _nodes[index];
60
internal void Add(
GreenNode
item)
125
var tmp = new
GreenNode
[size];
156
var tmp = new ArrayElement<
GreenNode
>[_count];
Syntax\SyntaxToken.cs (8)
28
internal SyntaxToken(SyntaxNode? parent,
GreenNode
? token, int position, int index)
38
internal SyntaxToken(
GreenNode
? token)
77
internal
GreenNode
? Node { get; }
79
internal
GreenNode
RequiredNode
428
var
leading = Node.GetLeadingTriviaCore();
435
var
trailingGreen = Node.GetTrailingTriviaCore();
479
? new SyntaxToken(null, Node.WithLeadingTrivia(
GreenNode
.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0)
505
? new SyntaxToken(null, Node.WithTrailingTrivia(
GreenNode
.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0)
Syntax\SyntaxTokenList.cs (12)
28
internal SyntaxTokenList(SyntaxNode? parent,
GreenNode
? tokenOrList, int position, int index)
72
private static
GreenNode
? CreateNodeFromSpan(ReadOnlySpan<SyntaxToken> tokens)
83
var copy = new ArrayElement<
GreenNode
>[tokens.Length];
92
private static
GreenNode
? CreateNode(IEnumerable<SyntaxToken> tokens)
109
internal
GreenNode
? Node { get; }
255
internal void CopyTo(int offset,
GreenNode
?[] array, int arrayOffset, int count)
268
private
GreenNode
? GetGreenNodeAt(int i)
277
private static
GreenNode
? GetGreenNodeAt(
GreenNode
node, int i)
374
return new SyntaxTokenList(null,
GreenNode
.CreateList(list, static n => n.RequiredNode), 0, 0);
390
return new SyntaxTokenList(null,
GreenNode
.CreateList(list, static n => n.RequiredNode), 0, 0);
436
return new SyntaxTokenList(null,
GreenNode
.CreateList(list, static n => n.RequiredNode), 0, 0);
Syntax\SyntaxTokenList.Enumerator.cs (2)
52
private readonly
GreenNode
? _singleNodeOrList;
57
private
GreenNode
? _current;
Syntax\SyntaxTokenList.Reversed.cs (2)
74
private readonly
GreenNode
? _singleNodeOrList;
79
private
GreenNode
? _current;
Syntax\SyntaxTokenListBuilder.cs (4)
12
private
GreenNode
?[] _nodes;
17
_nodes = new
GreenNode
?[size];
40
internal void Add(
GreenNode
item)
84
var tmp = new
GreenNode
[newSize];
Syntax\SyntaxTrivia.cs (4)
26
internal SyntaxTrivia(in SyntaxToken token,
GreenNode
? triviaNode, int position, int index)
56
internal
GreenNode
? UnderlyingNode { get; }
58
internal
GreenNode
RequiredUnderlyingNode
62
var
node = UnderlyingNode;
Syntax\SyntaxTriviaList.cs (10)
28
internal SyntaxTriviaList(in SyntaxToken token,
GreenNode
? node, int position, int index = 0)
36
internal SyntaxTriviaList(in SyntaxToken token,
GreenNode
? node)
78
private static
GreenNode
? CreateNodeFromSpan(ReadOnlySpan<SyntaxTrivia> trivias)
89
var copy = new ArrayElement<
GreenNode
>[trivias.Length];
100
internal
GreenNode
? Node { get; }
372
return new SyntaxTriviaList(default(SyntaxToken),
GreenNode
.CreateList(list, static n => n.RequiredUnderlyingNode), 0, 0);
418
return new SyntaxTriviaList(default(SyntaxToken),
GreenNode
.CreateList(list, static n => n.RequiredUnderlyingNode), 0, 0);
450
private
GreenNode
? GetGreenNodeAt(int i)
456
private static
GreenNode
? GetGreenNodeAt(
GreenNode
node, int i)
Syntax\SyntaxTriviaList.Enumerator.cs (6)
19
private
GreenNode
? _singleNodeOrList;
24
private
GreenNode
? _current;
40
private void InitializeFrom(in SyntaxToken token,
GreenNode
greenNode, int index, int position)
58
var
node = token.Node.GetLeadingTriviaCore();
69
var
leading = token.Node.GetLeadingTriviaCore();
76
var
trailingGreen = token.Node.GetTrailingTriviaCore();
Syntax\SyntaxTriviaList.Reversed.cs (2)
73
private readonly
GreenNode
? _singleNodeOrList;
78
private
GreenNode
? _current;
Syntax\SyntaxTriviaListBuilder.cs (1)
155
var tmp = new ArrayElement<
GreenNode
>[_count];
Microsoft.CodeAnalysis.CSharp (12)
Declarations\DeclarationTreeBuilder.cs (1)
1014
var
greenNode = parent.Green;
Parser\LanguageParser_InterpolatedString.cs (1)
377
var
openTokenTrailingTrivia = tempLexer.LexSyntaxTrailingTrivia().Node;
Parser\SyntaxParser.cs (3)
298
var
result = CurrentNode.Green;
1000
var
trivia = builder.ToListNode();
1058
var
child = root.GetSlot(i);
Syntax\CSharpSyntaxRewriter.cs (3)
61
var
node = token.Node;
68
var
leadingTrivia = node.GetLeadingTriviaCore();
69
var
trailingTrivia = node.GetTrailingTriviaCore();
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
148
var
child = node.GetSlot(i);
Syntax\InternalSyntax\SyntaxListPoolExtensions.cs (1)
13
var
listNode = builder.ToListNode();
Syntax\StructuredTriviaSyntax.cs (1)
24
var
node = trivia.UnderlyingNode;
Syntax\SyntaxTreeDiagnosticEnumerator.cs (1)
77
var
child = node.GetSlot(slotIndex);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\GreenNodeTests.cs (1)
17
var
nodeWithDiags = node.SetDiagnostics(new DiagnosticInfo[] { new CSDiagnosticInfo(ErrorCode.ERR_NoBaseClass) });
Syntax\SyntaxFactoryTests.cs (1)
197
var
actualGreen = actualRed.Node;
Syntax\SyntaxNodeCacheTests.cs (2)
48
var
listOf1 = SyntaxNodeCache.TryGetNode(listOf2.RawKind, child0, SyntaxNodeCache.GetDefaultNodeFlags(), out _);
73
var
listOf2 = SyntaxNodeCache.TryGetNode(listOf3.RawKind, child0, child1, SyntaxNodeCache.GetDefaultNodeFlags(), out _);