Method FindNode
- Namespace
- Alternet.Common.TypeScript.Types
- Assembly
- Alternet.Common.TypeScript.v10.dll
FindNode(Node, int, bool)
Finds child node at specified source code position.
public static Node FindNode(this Node root, int pos, bool recursive = true)
Parameters
rootNodeParent node to check.
posintPosition to check.
recursiveboolIndicates whether search should be recursive.
Returns
- Node
Node object matches the search criteria.
FindNode(Node, int, SyntaxKind[], bool)
Finds child node by its kind at specified source code position.
public static Node FindNode(this Node root, int pos, SyntaxKind[] kinds, bool recursive = true)
Parameters
rootNodeParent node to check.
posintPosition to check.
kindsSyntaxKind[]List of SyntaxKind to match.
recursiveboolIndicates whether search should be recursive, true by default.
Returns
- Node
Node object matches the search criteria.
FindNode(Node, SyntaxKind[], bool)
Finds child node by its kind.
public static Node FindNode(this Node root, SyntaxKind[] kinds, bool recursive = true)
Parameters
rootNodeParent node to check.
kindsSyntaxKind[]List of SyntaxKind to match.
recursiveboolIndicates whether search should be recursive, true by default.
Returns
- Node
Node object matches the search criteria.
FindNode(Node, SyntaxKind, bool)
Finds child node by its kind.
public static Node FindNode(this Node root, SyntaxKind kind, bool recursive = true)
Parameters
rootNodeParent node to check.
kindSyntaxKindSyntaxKind to match.
recursiveboolIndicates whether search should be recursive, true by default.
Returns
- Node
Node object matches the search criteria.