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