Click or drag to resize

VisualBasicSyntaxNode Class



The base class for all nodes in the VB syntax tree.
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysisSyntaxNode
    Microsoft.CodeAnalysis.VisualBasicVisualBasicSyntaxNode
      More...

Namespace:  Microsoft.CodeAnalysis.VisualBasic
Assembly:  Microsoft.CodeAnalysis.VisualBasic (in Microsoft.CodeAnalysis.VisualBasic.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class VisualBasicSyntaxNode : SyntaxNode

The VisualBasicSyntaxNode type exposes the following members.

Properties
  NameDescription
Public propertyContainsAnnotations
Determines whether this node or any sub node, token or trivia has annotations.
(Inherited from SyntaxNode.)
Public propertyContainsDiagnostics
Determines whether this node or any of its descendant nodes, tokens or trivia have any diagnostics on them.
(Inherited from SyntaxNode.)
Public propertyContainsDirectives
Determines whether this node has any descendant preprocessor directives.
(Inherited from SyntaxNode.)
Public propertyContainsSkippedText
Determines whether this node has any descendant skipped text.
(Inherited from SyntaxNode.)
Public propertyFullSpan
The absolute span of this node in characters, including its leading and trailing trivia.
(Inherited from SyntaxNode.)
Public propertyHasLeadingTrivia
Determines whether this node has any leading trivia.
(Inherited from SyntaxNode.)
Public propertyHasStructuredTrivia
Determines whether a descendant trivia of this node is structured.
(Inherited from SyntaxNode.)
Public propertyHasTrailingTrivia
Determines whether this node has any trailing trivia.
(Inherited from SyntaxNode.)
Public propertyIsDirective
Returns True if this node represents a directive.
Public propertyIsMissing
Determines whether the node represents a language construct that was actually parsed from the source code. Missing nodes are generated by the parser in error scenarios to represent constructs that should have been present in the source code in order to compile successfully but were actually missing.
(Inherited from SyntaxNode.)
Public propertyIsStructuredTrivia
Determines whether this node represents a structured trivia.
(Inherited from SyntaxNode.)
Protected propertyKindText (Inherited from SyntaxNode.)
Public propertyLanguage
The language name this node is syntax of.
(Overrides SyntaxNodeLanguage.)
Public propertyParent (Inherited from SyntaxNode.)
Public propertyParentTrivia (Inherited from SyntaxNode.)
Public propertyRawKind
An integer representing the language specific kind of this node.
(Inherited from SyntaxNode.)
Public propertySpan
The absolute span of this node in characters, not including its leading and trailing trivia.
(Inherited from SyntaxNode.)
Public propertySpanStart
Same as accessing Start on Span.
Public propertySyntaxTree
Returns SyntaxTree that owns the node or null if node does not belong to a SyntaxTree
(Inherited from SyntaxNode.)
Protected propertySyntaxTreeCore (Overrides SyntaxNodeSyntaxTreeCore.)
Top
Methods
  NameDescription
Public methodAccept(VisualBasicSyntaxVisitor)
Public methodAcceptTResult(VisualBasicSyntaxVisitorTResult)
Public methodAncestors (Inherited from SyntaxNode.)
Public methodAncestorsAndSelf (Inherited from SyntaxNode.)
Public methodChildNodes
Gets a list of the child nodes in prefix document order.
(Inherited from SyntaxNode.)
Public methodChildNodesAndTokens
The list of child nodes and tokens of this node, where each element is a SyntaxNodeOrToken instance.
(Inherited from SyntaxNode.)
Public methodChildThatContainsPosition (Inherited from SyntaxNode.)
Public methodChildTokens
Gets a list of the direct child tokens of this node.
(Inherited from SyntaxNode.)
Public methodContains
Determines if the specified node is a descendant of this node.
(Inherited from SyntaxNode.)
Public methodCopyAnnotationsToT
Copies all SyntaxAnnotations, if any, from this SyntaxNode instance and attaches them to a new instance based on node.
(Inherited from SyntaxNode.)
Public methodDescendantNodes(Void, SyntaxNode) (Inherited from SyntaxNode.)
Public methodDescendantNodes(Void, SyntaxNode, TextSpan) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndSelf(Void, SyntaxNode) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndSelf(Void, SyntaxNode, TextSpan) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndTokens(Void, SyntaxNodeOrToken) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndTokens(Void, SyntaxNodeOrToken, TextSpan) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndTokensAndSelf(Void, SyntaxNodeOrToken) (Inherited from SyntaxNode.)
Public methodDescendantNodesAndTokensAndSelf(Void, SyntaxNodeOrToken, TextSpan) (Inherited from SyntaxNode.)
Public methodDescendantTokens(Void, SyntaxToken) (Inherited from SyntaxNode.)
Public methodDescendantTokens(Void, SyntaxToken, TextSpan) (Inherited from SyntaxNode.)
Public methodDescendantTrivia(Void, SyntaxTrivia) (Inherited from SyntaxNode.)
Public methodDescendantTrivia(Void, SyntaxTrivia, TextSpan) (Inherited from SyntaxNode.)
Public methodStatic memberDeserializeFrom
Deserialize a syntax node from a byte stream.
Protected methodEquivalentToCore
Determine if this node is structurally equivalent to another.
(Inherited from SyntaxNode.)
Public methodFindNode
Finds the node with the smallest FullSpan that contains span. getInnermostNodeForTie is used to determine the behavior in case of a tie (i.e. a node having the same span as its parent). If getInnermostNodeForTie is true, then it returns lowest descending node encompassing the given span. Otherwise, it returns the outermost node encompassing the given span.
(Inherited from SyntaxNode.)
Public methodFindToken
Finds a token according to the following rules: 1) If position matches the End of the node's Span, then its last token is returned. 2) If node.FullSpan.Contains(position) then the token that contains given position is returned. 3) Otherwise an IndexOutOfRange is thrown
Protected methodFindTokenCore(Int32, Boolean)
Finds a descendant token of this node whose span includes the supplied position.
(Inherited from SyntaxNode.)
Protected methodFindTokenCore(Int32, FuncT, TResult) (Inherited from SyntaxNode.)
Public methodFindTrivia(Int32, FuncT, TResult) (Inherited from SyntaxNode.)
Public methodFindTrivia(Int32, Boolean)
Protected methodFindTriviaCore
Finds a descendant trivia of this node whose span includes the supplied position.
(Inherited from SyntaxNode.)
Public methodFirstAncestorOrSelfTNode (Inherited from SyntaxNode.)
Public methodGetAnnotatedNodes(Void) (Inherited from SyntaxNode.)
Public methodGetAnnotatedNodesAndTokens(Void) (Inherited from SyntaxNode.)
Public methodGetAnnotatedTokens(Void) (Inherited from SyntaxNode.)
Public methodGetAnnotatedTrivia(Void) (Inherited from SyntaxNode.)
Public methodGetAnnotations(Void) (Inherited from SyntaxNode.)
Public methodGetDiagnostics
Gets a list of all the diagnostics in the sub tree that has this node as its root. This method does not filter diagnostics based on compiler options like nowarn, warnaserror etc.
Public methodGetDirectives
Public methodGetFirstDirective
Public methodGetFirstToken
Public methodGetLastDirective
Public methodGetLastToken
Public methodGetLeadingTrivia
Get the preceding trivia nodes of this node. If this node is a token, returns the preceding trivia associated with this node. If this is a non-terminal, returns the preceding trivia of the first token of this node.
Public methodGetLocation
Gets the location of this node.
Protected methodGetRedT (Inherited from SyntaxNode.)
Protected methodGetRedAtZeroT (Inherited from SyntaxNode.)
Public methodGetReference
Gets a SyntaxReference for this syntax node. CommonSyntaxReferences can be used to regain access to a syntax node without keeping the entire tree and source text in memory.
(Inherited from SyntaxNode.)
Public methodGetText
Gets the full text of this node as an new SourceText instance.
(Inherited from SyntaxNode.)
Public methodGetTrailingTrivia
Get the following trivia nodes of this node. If this node is a token, returns the following trivia associated with this node. If this is a non-terminal, returns the following trivia of the last token of this node.
Public methodHasAnnotation
Determines whether this node has the specific annotation.
(Inherited from SyntaxNode.)
Public methodHasAnnotations(IEnumerableT) (Inherited from SyntaxNode.)
Public methodHasAnnotations(String)
Determines whether this node has any annotations with the specific annotation kind.
(Inherited from SyntaxNode.)
Protected methodInsertNodesInListCore(SyntaxNode, IEnumerableT, Void) (Inherited from SyntaxNode.)
Protected methodInsertNodesInListCore(SyntaxNode, IEnumerableT, Void)
Protected methodInsertTokensInListCore(SyntaxToken, IEnumerableT, Void) (Inherited from SyntaxNode.)
Protected methodInsertTokensInListCore(SyntaxToken, IEnumerableT, Void)
Protected methodInsertTriviaInListCore(SyntaxTrivia, IEnumerableT, Void) (Inherited from SyntaxNode.)
Protected methodInsertTriviaInListCore(SyntaxTrivia, IEnumerableT, Void)
Public methodIsEquivalentTo(SyntaxNode)
Determine whether this node is structurally equivalent to another.
(Inherited from SyntaxNode.)
Public methodIsEquivalentTo(SyntaxNode, Boolean)
Determines if two nodes are the same, disregarding trivia differences.
(Inherited from SyntaxNode.)
Protected methodIsEquivalentToCore (Overrides SyntaxNodeIsEquivalentToCore(SyntaxNode, Boolean).)
Public methodIsPartOfStructuredTrivia
Determines whether this node is a descendant of a structured trivia.
(Inherited from SyntaxNode.)
Public methodKind
Returns the SyntaxKind of the node.
Protected methodNormalizeWhitespaceCore (Overrides SyntaxNodeNormalizeWhitespaceCore(String, String, Boolean).)
Protected methodRemoveNodesCore(IEnumerableT, Void) (Inherited from SyntaxNode.)
Protected methodRemoveNodesCore(IEnumerableT, Void)
Protected methodReplaceCoreTNode(IEnumerableT, Void, TNode, FuncT1, T2, TResult, Char, TNode) (Inherited from SyntaxNode.)
Protected methodReplaceCoreTNode(IEnumerableT, Void, TNode, FuncT1, T2, TResult, Char, TNode)
Protected methodReplaceNodeInListCore(SyntaxNode, IEnumerableT) (Inherited from SyntaxNode.)
Protected methodReplaceNodeInListCore(SyntaxNode, IEnumerableT)
Protected methodReplaceTokenInListCore(SyntaxToken, IEnumerableT) (Inherited from SyntaxNode.)
Protected methodReplaceTokenInListCore(SyntaxToken, IEnumerableT)
Protected methodReplaceTriviaInListCore(SyntaxTrivia, IEnumerableT) (Inherited from SyntaxNode.)
Protected methodReplaceTriviaInListCore(SyntaxTrivia, IEnumerableT)
Public methodSerializeTo (Inherited from SyntaxNode.)
Public methodToFullString
Returns full string representation of this node including its leading and trailing trivia.
(Inherited from SyntaxNode.)
Public methodToString
Returns the string representation of this node, not including its leading and trailing trivia.
(Inherited from SyntaxNode.)
Public methodWriteTo
Writes the full text of this node to the specified TextWriter.
(Inherited from SyntaxNode.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetCurrentNodeTNode
Gets the node within the subtree corresponding to the original tracked node. Use TrackNodes to start tracking nodes.
(Defined by SyntaxNodeExtensions.)
Public Extension MethodGetFirstDirective(FuncT, TResult)Overloaded. (Defined by VisualBasicExtensions.)
Public Extension MethodGetFirstDirective(FuncT, TResult)Overloaded. (Defined by CSharpExtensions.)
Public Extension MethodGetLastDirective(FuncT, TResult)Overloaded. (Defined by VisualBasicExtensions.)
Public Extension MethodGetLastDirective(FuncT, TResult)Overloaded. (Defined by CSharpExtensions.)
Public Extension MethodIsKind(SyntaxKind)Overloaded.
Determines if SyntaxNode is a specified kind.
(Defined by VisualBasicExtensions.)
Public Extension MethodIsKind(SyntaxKind)Overloaded. (Defined by CSharpExtensions.)
Public Extension MethodKindOverloaded.
Returns SyntaxKind for SyntaxNode from RawKind property.
(Defined by VisualBasicExtensions.)
Public Extension MethodKindOverloaded. (Defined by CSharpExtensions.)
Top
See Also
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysisSyntaxNode
    Microsoft.CodeAnalysis.VisualBasicVisualBasicSyntaxNode
      Microsoft.CodeAnalysis.VisualBasic.SyntaxAggregationRangeVariableSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxArgumentListSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxArgumentSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxArrayRankSpecifierSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxAsClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxAttributeListSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxAttributeSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxAttributeTargetSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCaseBlockSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCaseClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCatchBlockSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCatchFilterClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCollectionRangeVariableSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCompilationUnitSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxConstraintSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCrefReferenceSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCrefSignaturePartSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxCrefSignatureSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxElseBlockSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxElseIfBlockSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxEqualsValueSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxExpressionRangeVariableSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxExpressionSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxFieldInitializerSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxFinallyBlockSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxForStepClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxHandlesClauseItemSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxHandlesClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxImplementsClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxImportAliasClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxImportsClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxInterpolatedStringContentSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxInterpolationAlignmentClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxInterpolationFormatClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxJoinConditionSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxModifiedIdentifierSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxNameColonEqualsSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxObjectCreationInitializerSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxOrderingSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxParameterListSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxParameterSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxQueryClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxRedimClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxSingleLineElseClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxStatementSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxStructuredTriviaSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxTupleElementSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxTypeArgumentListSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxTypeParameterConstraintClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxTypeParameterListSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxTypeParameterSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxVariableDeclaratorSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxVariableNameEqualsSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxWhileOrUntilClauseSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxXmlDeclarationOptionSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxXmlDeclarationSyntax
      Microsoft.CodeAnalysis.VisualBasic.SyntaxXmlPrefixSyntax