2 writes to Node
Microsoft.CodeAnalysis (2)
Syntax\SyntaxTokenList.cs (2)
32Node = tokenOrList; 40Node = token.Node;
152 references to Node
Microsoft.CodeAnalysis (33)
Syntax\SyntaxListBuilder.cs (2)
144Debug.Assert(list.Node is object); 145this.AddRange(new SyntaxList<SyntaxNode>(list.Node.CreateRed()), offset, length);
Syntax\SyntaxTokenList.cs (29)
79return builder.ToList().Node; 96return builder.ToList().Node; 106public int Count => Node == null ? 0 : (Node.IsList ? Node.SlotCount : 1); 119if (Node != null) 121if (Node.IsList) 123if (unchecked((uint)index < (uint)Node.SlotCount)) 125return new SyntaxToken(_parent, Node.GetSlot(index), Position + Node.GetSlotOffset(index), _index + index); 130return new SyntaxToken(_parent, Node, Position, _index); 145if (Node == null) 150return new TextSpan(this.Position, Node.FullWidth); 161if (Node == null) 166return TextSpan.FromBounds(Position + Node.GetLeadingTriviaWidth(), 167Position + Node.FullWidth - Node.GetTrailingTriviaWidth()); 181return Node != null ? Node.ToString() : string.Empty; 194return Node != null ? Node.ToFullString() : string.Empty; 233return Node != null; 260Debug.Assert(Node is object); 261return GetGreenNodeAt(Node, i); 445if (Node == null) 455if (Node == null) 487return Node == other.Node && _parent == other._parent && _index == other._index; 505return Hash.Combine(Node, _index);
Syntax\SyntaxTokenList.Enumerator.cs (1)
63_singleNodeOrList = list.Node;
Syntax\SyntaxTokenList.Reversed.cs (1)
88_singleNodeOrList = list.Node;
Microsoft.CodeAnalysis.CSharp (3)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
630var startSpan = modifiers.Node != null ? modifiers.Span : (keyword.Node != null ? keyword.Span : type!.Span);
Syntax\SyntaxEquivalence.cs (2)
44return AreEquivalentRecursive(before.Node, after.Node, ignoreChildNode: null, topLevel: false);
Microsoft.CodeAnalysis.VisualBasic (116)
Generated\Syntax.xml.Main.Generated.vb (113)
1783If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 1792Return New ModuleStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newModuleKeyword, newIdentifier, newTypeParameterList) 1804If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 1813Return New StructureStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newStructureKeyword, newIdentifier, newTypeParameterList) 1825If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 1834Return New InterfaceStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newInterfaceKeyword, newIdentifier, newTypeParameterList) 1846If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 1855Return New ClassStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newClassKeyword, newIdentifier, newTypeParameterList) 1867If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 1876Return New EnumStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newEnumKeyword, newIdentifier, newUnderlyingType) 2120If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2137Return New MethodStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newSubOrFunctionKeyword, newIdentifier, newTypeParameterList, newParameterList, newAsClause, newHandlesClause, newImplementsClause) 2149If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2158Return New SubNewStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newSubKeyword, newNewKeyword, newParameterList) 2170If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2193Return New DeclareStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newDeclareKeyword, newCharsetKeyword, newSubOrFunctionKeyword, newIdentifier, newLibKeyword, newLibraryName, newAliasKeyword, newAliasName, newParameterList, newAsClause) 2205If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2220Return New DelegateStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newDelegateKeyword, newSubOrFunctionKeyword, newIdentifier, newTypeParameterList, newParameterList, newAsClause) 2232If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2247Return New EventStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newCustomKeyword, newEventKeyword, newIdentifier, newParameterList, newAsClause, newImplementsClause) 2259If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2270Return New OperatorStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newOperatorKeyword, newOperatorToken, newParameterList, newAsClause) 2282If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2297Return New PropertyStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newPropertyKeyword, newIdentifier, newParameterList, newAsClause, newInitializer, newImplementsClause) 2309If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2316Return New AccessorStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newAccessorKeyword, newParameterList) 2418If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2423Return New IncompleteMemberSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newMissingIdentifier) 2435If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2440Return New FieldDeclarationSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newDeclarators.Node) 2586If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2595Return New ParameterSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newIdentifier, newAsClause, newDefault) 2626If node.CommaTokens.Node IsNot newCommaTokens.Node Then anyChanges = True 2631Return New ArrayRankSpecifierSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newOpenParenToken, newCommaTokens.Node, newCloseParenToken) 2799If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 2804Return New LocalDeclarationStatementSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newModifiers.Node, newDeclarators.Node) 4256If node.Modifiers.Node IsNot newModifiers.Node Then anyChanges = True 4265Return New LambdaHeaderSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newAttributeLists.Node, newModifiers.Node, newSubOrFunctionKeyword, newParameterList, newAsClause) 4785If node.TextTokens.Node IsNot newTextTokens.Node Then anyChanges = True 4788Return New XmlTextSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newTextTokens.Node) 4872If node.TextTokens.Node IsNot newTextTokens.Node Then anyChanges = True 4877Return New XmlStringSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newStartQuoteToken, newTextTokens.Node, newEndQuoteToken) 4949If node.TextTokens.Node IsNot newTextTokens.Node Then anyChanges = True 4954Return New XmlCommentSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newLessThanExclamationMinusMinusToken, newTextTokens.Node, newMinusMinusGreaterThanToken) 4968If node.TextTokens.Node IsNot newTextTokens.Node Then anyChanges = True 4973Return New XmlProcessingInstructionSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newLessThanQuestionToken, newName, newTextTokens.Node, newQuestionGreaterThanToken) 4985If node.TextTokens.Node IsNot newTextTokens.Node Then anyChanges = True 4990Return New XmlCDataSectionSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newBeginCDataToken, newTextTokens.Node, newEndCDataToken) 5248If node.Tokens.Node IsNot newTokens.Node Then anyChanges = True 5251Return New SkippedTokensTriviaSyntax(node.Kind, node.Green.GetDiagnostics, node.Green.GetAnnotations, newTokens.Node) 7512Return New ModuleStatementSyntax(SyntaxKind.ModuleStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(moduleKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList) 7597Return New StructureStatementSyntax(SyntaxKind.StructureStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(structureKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList) 7682Return New InterfaceStatementSyntax(SyntaxKind.InterfaceStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(interfaceKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList) 7767Return New ClassStatementSyntax(SyntaxKind.ClassStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(classKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList) 7852Return New EnumStatementSyntax(SyntaxKind.EnumStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(enumKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), underlyingType) 9240Return New MethodStatementSyntax(SyntaxKind.SubStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause, handlesClause, implementsClause) 9367Return New MethodStatementSyntax(SyntaxKind.FunctionStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause, handlesClause, implementsClause) 9499Return New MethodStatementSyntax(kind, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause, handlesClause, implementsClause) 9591Return New SubNewStatementSyntax(SyntaxKind.SubNewStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(newKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 9711Return New DeclareStatementSyntax(SyntaxKind.DeclareSubStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(declareKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(charsetKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), DirectCast(libKeyword.Node, InternalSyntax.KeywordSyntax), libraryName, DirectCast(aliasKeyword.Node, InternalSyntax.KeywordSyntax), aliasName, parameterList, asClause) 9863Return New DeclareStatementSyntax(SyntaxKind.DeclareFunctionStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(declareKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(charsetKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), DirectCast(libKeyword.Node, InternalSyntax.KeywordSyntax), libraryName, DirectCast(aliasKeyword.Node, InternalSyntax.KeywordSyntax), aliasName, parameterList, asClause) 10020Return New DeclareStatementSyntax(kind, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(declareKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(charsetKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), DirectCast(libKeyword.Node, InternalSyntax.KeywordSyntax), libraryName, DirectCast(aliasKeyword.Node, InternalSyntax.KeywordSyntax), aliasName, parameterList, asClause) 10173Return New DelegateStatementSyntax(SyntaxKind.DelegateSubStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(delegateKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause) 10282Return New DelegateStatementSyntax(SyntaxKind.DelegateFunctionStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(delegateKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause) 10397Return New DelegateStatementSyntax(kind, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(delegateKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), typeParameterList, parameterList, asClause) 10537Return New EventStatementSyntax(SyntaxKind.EventStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(customKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(eventKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), parameterList, asClause, implementsClause) 10666Return New OperatorStatementSyntax(SyntaxKind.OperatorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(operatorKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(operatorToken.Node, InternalSyntax.SyntaxToken), parameterList, asClause) 10765Return New PropertyStatementSyntax(SyntaxKind.PropertyStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(propertyKeyword.Node, InternalSyntax.KeywordSyntax), DirectCast(identifier.Node, InternalSyntax.IdentifierTokenSyntax), parameterList, asClause, initializer, implementsClause) 10871Return New AccessorStatementSyntax(SyntaxKind.GetAccessorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 10941Return New AccessorStatementSyntax(SyntaxKind.SetAccessorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 11011Return New AccessorStatementSyntax(SyntaxKind.AddHandlerAccessorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 11081Return New AccessorStatementSyntax(SyntaxKind.RemoveHandlerAccessorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 11151Return New AccessorStatementSyntax(SyntaxKind.RaiseEventAccessorStatement, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 11228Return New AccessorStatementSyntax(kind, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(accessorKeyword.Node, InternalSyntax.KeywordSyntax), parameterList) 11535Return New IncompleteMemberSyntax(SyntaxKind.IncompleteMember, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(missingIdentifier.Node, InternalSyntax.IdentifierTokenSyntax)) 11568Return New FieldDeclarationSyntax(SyntaxKind.FieldDeclaration, Nothing, Nothing, attributeLists.Node, modifiers.Node, declarators.Node) 12245Return New ParameterSyntax(SyntaxKind.Parameter, Nothing, Nothing, attributeLists.Node, modifiers.Node, identifier, asClause, [default]) 12350Return New ArrayRankSpecifierSyntax(SyntaxKind.ArrayRankSpecifier, Nothing, Nothing, DirectCast(openParenToken.Node, InternalSyntax.PunctuationSyntax), commaTokens.Node, DirectCast(closeParenToken.Node, InternalSyntax.PunctuationSyntax)) 13042Return New LocalDeclarationStatementSyntax(SyntaxKind.LocalDeclarationStatement, Nothing, Nothing, modifiers.Node, declarators.Node) 36754Return New LambdaHeaderSyntax(SyntaxKind.SubLambdaHeader, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), parameterList, asClause) 36822Return New LambdaHeaderSyntax(SyntaxKind.FunctionLambdaHeader, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), parameterList, asClause) 36895Return New LambdaHeaderSyntax(kind, Nothing, Nothing, attributeLists.Node, modifiers.Node, DirectCast(subOrFunctionKeyword.Node, InternalSyntax.KeywordSyntax), parameterList, asClause) 40383Return New XmlTextSyntax(SyntaxKind.XmlText, Nothing, Nothing, textTokens.Node) 40571Return New XmlStringSyntax(SyntaxKind.XmlString, Nothing, Nothing, DirectCast(startQuoteToken.Node, InternalSyntax.PunctuationSyntax), textTokens.Node, DirectCast(endQuoteToken.Node, InternalSyntax.PunctuationSyntax)) 40709Return New XmlCommentSyntax(SyntaxKind.XmlComment, Nothing, Nothing, DirectCast(lessThanExclamationMinusMinusToken.Node, InternalSyntax.PunctuationSyntax), textTokens.Node, DirectCast(minusMinusGreaterThanToken.Node, InternalSyntax.PunctuationSyntax)) 40742Return New XmlProcessingInstructionSyntax(SyntaxKind.XmlProcessingInstruction, Nothing, Nothing, DirectCast(lessThanQuestionToken.Node, InternalSyntax.PunctuationSyntax), DirectCast(name.Node, InternalSyntax.XmlNameTokenSyntax), textTokens.Node, DirectCast(questionGreaterThanToken.Node, InternalSyntax.PunctuationSyntax)) 40769Return New XmlCDataSectionSyntax(SyntaxKind.XmlCDataSection, Nothing, Nothing, DirectCast(beginCDataToken.Node, InternalSyntax.PunctuationSyntax), textTokens.Node, DirectCast(endCDataToken.Node, InternalSyntax.PunctuationSyntax)) 41990Return New SkippedTokensTriviaSyntax(SyntaxKind.SkippedTokensTrivia, Nothing, Nothing, tokens.Node)
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
549Dim startSpan As Text.TextSpan = If(modifiers.Node IsNot Nothing, modifiers.Span, keyword.Span)
Syntax\SyntaxEquivalence.vb (2)
33Return AreEquivalentRecursive(before.Node, after.Node, parentKind:=Nothing, ignoreChildNode:=Nothing, topLevel:=False)