2 writes to Node
Microsoft.CodeAnalysis (2)
Syntax\SyntaxToken.cs (2)
34Node = token; 43Node = 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)
776return 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)
48return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString(); 54public int RawKind => Node?.RawKind ?? 0; 59public string Language => Node?.Language ?? string.Empty; 71internal int RawContextualKind => Node?.RawContextualKind ?? 0; 84Debug.Assert(Node is object); 85return Node; 96internal int Width => Node?.Width ?? 0; 101internal int FullWidth => Node?.FullWidth ?? 0; 110return Node != null ? new TextSpan(Position + Node.GetLeadingTriviaWidth(), Node.Width) : default(TextSpan); 116get { return Node != null ? Position + Node.FullWidth : 0; } 127get { return Node != null ? Position + Node.GetLeadingTriviaWidth() : 0; } 140public bool IsMissing => Node?.IsMissing ?? false; 146public object? Value => Node?.GetValue(); 152public string ValueText => Node?.GetValueText() ?? string.Empty; 163return Node != null ? Node.ToString() : string.Empty; 173return Node != null ? Node.ToFullString() : string.Empty; 181Node?.WriteTo(writer); 189Node?.WriteTo(writer, leading, trailing); 205internal int LeadingWidth => Node?.GetLeadingTriviaWidth() ?? 0; 210internal int TrailingWidth => Node?.GetTrailingTriviaWidth() ?? 0; 215public bool ContainsDiagnostics => Node?.ContainsDiagnostics ?? false; 220public bool ContainsDirectives => Node?.ContainsDirectives ?? false; 233public bool HasStructuredTrivia => Node?.ContainsStructuredTrivia ?? false; 240public bool ContainsAnnotations => Node?.ContainsAnnotations ?? false; 247return Node?.HasAnnotations(annotationKind) ?? false; 255return Node?.HasAnnotations(annotationKinds) ?? false; 263return Node?.HasAnnotation(annotation) ?? false; 271return Node?.GetAnnotations(annotationKind) ?? SpecializedCollections.EmptyEnumerable<SyntaxAnnotation>(); 287return Node?.GetAnnotations(annotationKinds) ?? SpecializedCollections.EmptyEnumerable<SyntaxAnnotation>(); 310if (this.Node != null) 314token: Node.WithAdditionalAnnotationsGreen(annotations), 340if (this.Node != null) 344token: Node.WithoutAnnotationsGreen(annotations), 378if (token.Node == null) 383if (Node == null) 388var annotations = this.Node.GetAnnotations(); 393token: token.Node.WithAdditionalAnnotationsGreen(annotations), 410return Node != null 411? new SyntaxTriviaList(this, Node.GetLeadingTriviaCore(), this.Position) 424if (Node == null) 429var leading = Node.GetLeadingTriviaCore(); 436var trailingGreen = Node.GetTrailingTriviaCore(); 479return Node != null 480? new SyntaxToken(null, Node.WithLeadingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0) 505return Node != null 506? new SyntaxToken(null, Node.WithTrailingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0) 556Node == other.Node && 575return Hash.Combine(Parent, Hash.Combine(Node, Hash.Combine(Position, Index))); 584if (Node == null) 601if (Node == null) 615if (Node == null) 659if (Node == null) 668var diagnostics = Node.GetDiagnostics(); 684(Node == null && token.Node == null) || 685(Node != null && token.Node != null && Node.IsEquivalentTo(token.Node)); 703=> this.Node != null && this.Node == token.Node;
Syntax\SyntaxTokenList.cs (10)
43Node = token.Node; 79case 1: return tokens[0].Node; 80case 2: return Syntax.InternalSyntax.SyntaxList.List(tokens[0].Node!, tokens[1].Node!); 81case 3: return Syntax.InternalSyntax.SyntaxList.List(tokens[0].Node!, tokens[1].Node!, tokens[2].Node!); 86copy[i].Value = tokens[i].Node!; 103Debug.Assert(token.Node is object); 104builder.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();