Method FindNode
- Namespace
- Alternet.Common.TypeScript.Types
- Assembly
- Alternet.Common.TypeScript.v9.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
root
NodeParent node to check.
pos
intPosition to check.
recursive
boolIndicates 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
root
NodeParent node to check.
pos
intPosition to check.
kinds
SyntaxKind[]List of SyntaxKind to match.
recursive
boolIndicates 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
root
NodeParent node to check.
kinds
SyntaxKind[]List of SyntaxKind to match.
recursive
boolIndicates 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
root
NodeParent node to check.
kind
SyntaxKindSyntaxKind to match.
recursive
boolIndicates whether search should be recursive, true by default.
Returns
- Node
Node object matches the search criteria.