2 writes to Node
Microsoft.CodeAnalysis (2)
Syntax\SyntaxToken.cs (2)
33Node = token; 42Node = token;
93 references to Node
Microsoft.CodeAnalysis (93)
Syntax\SeparatedSyntaxListBuilder.cs (2)
78Debug.Assert(separatorToken.Node is object); 81_builder.AddInternal(separatorToken.Node);
Syntax\SyntaxNodeOrToken.cs (1)
775return new SyntaxNodeOrToken(token.Parent, token.Node, token.Position, token.Index);
Syntax\SyntaxNodeOrTokenListBuilder.cs (2)
77RoslynDebug.Assert(item.Node is object); 78this.Add(item.Node);
Syntax\SyntaxToken.cs (70)
47return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString(); 53public int RawKind => Node?.RawKind ?? 0; 58public string Language => Node?.Language ?? string.Empty; 70internal int RawContextualKind => Node?.RawContextualKind ?? 0; 83Debug.Assert(Node is object); 84return Node; 95internal int Width => Node?.Width ?? 0; 100internal int FullWidth => Node?.FullWidth ?? 0; 109return Node != null ? new TextSpan(Position + Node.GetLeadingTriviaWidth(), Node.Width) : default(TextSpan); 115get { return Node != null ? Position + Node.FullWidth : 0; } 126get { return Node != null ? Position + Node.GetLeadingTriviaWidth() : 0; } 139public bool IsMissing => Node?.IsMissing ?? false; 145public object? Value => Node?.GetValue(); 151public string ValueText => Node?.GetValueText() ?? string.Empty; 162return Node != null ? Node.ToString() : string.Empty; 172return Node != null ? Node.ToFullString() : string.Empty; 180Node?.WriteTo(writer); 188Node?.WriteTo(writer, leading, trailing); 204internal int LeadingWidth => Node?.GetLeadingTriviaWidth() ?? 0; 209internal int TrailingWidth => Node?.GetTrailingTriviaWidth() ?? 0; 214public bool ContainsDiagnostics => Node?.ContainsDiagnostics ?? false; 219public bool ContainsDirectives => Node?.ContainsDirectives ?? false; 232public bool HasStructuredTrivia => Node?.ContainsStructuredTrivia ?? false; 239public bool ContainsAnnotations => Node?.ContainsAnnotations ?? false; 246return Node?.HasAnnotations(annotationKind) ?? false; 254return Node?.HasAnnotations(annotationKinds) ?? false; 262return Node?.HasAnnotation(annotation) ?? false; 270return Node?.GetAnnotations(annotationKind) ?? SpecializedCollections.EmptyEnumerable<SyntaxAnnotation>(); 286return Node?.GetAnnotations(annotationKinds) ?? SpecializedCollections.EmptyEnumerable<SyntaxAnnotation>(); 309if (this.Node != null) 313token: Node.WithAdditionalAnnotationsGreen(annotations), 339if (this.Node != null) 343token: Node.WithoutAnnotationsGreen(annotations), 377if (token.Node == null) 382if (Node == null) 387var annotations = this.Node.GetAnnotations(); 392token: token.Node.WithAdditionalAnnotationsGreen(annotations), 409return Node != null 410? new SyntaxTriviaList(this, Node.GetLeadingTriviaCore(), this.Position) 423if (Node == null) 428var leading = Node.GetLeadingTriviaCore(); 435var trailingGreen = Node.GetTrailingTriviaCore(); 478return Node != null 479? new SyntaxToken(null, Node.WithLeadingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0) 504return Node != null 505? new SyntaxToken(null, Node.WithTrailingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0) 555Node == other.Node && 574return Hash.Combine(Parent, Hash.Combine(Node, Hash.Combine(Position, Index))); 583if (Node == null) 600if (Node == null) 614if (Node == null) 658if (Node == null) 667var diagnostics = Node.GetDiagnostics(); 683(Node == null && token.Node == null) || 684(Node != null && token.Node != null && Node.IsEquivalentTo(token.Node)); 702=> this.Node != null && this.Node == token.Node;
Syntax\SyntaxTokenList.cs (10)
42Node = token.Node; 78case 1: return tokens[0].Node; 79case 2: return Syntax.InternalSyntax.SyntaxList.List(tokens[0].Node!, tokens[1].Node!); 80case 3: return Syntax.InternalSyntax.SyntaxList.List(tokens[0].Node!, tokens[1].Node!, tokens[2].Node!); 85copy[i].Value = tokens[i].Node!; 102Debug.Assert(token.Node is object); 103builder.Add(token.Node);
Syntax\SyntaxTokenListBuilder.cs (3)
36Debug.Assert(item.Node is object); 37this.Add(item.Node); 68_nodes[_count + i] = list[offset + i].Node;
Syntax\SyntaxTriviaList.Enumerator.cs (5)
57Debug.Assert(token.Node is object); 58var node = token.Node.GetLeadingTriviaCore(); 68Debug.Assert(token.Node is object); 69var leading = token.Node.GetLeadingTriviaCore(); 76var trailingGreen = token.Node.GetTrailingTriviaCore();