Class SyntaxNodeRewriter<T>
An implementation of IRewriter<T> for sublcasses of SyntaxNode.
Inheritance
- Object
- SyntaxNodeRewriter<T>
Implements
- IRewriter<T>
Declaration
public class SyntaxNodeRewriter<T> : Object, IRewriter<T> where T : SyntaxNode
Type Parameters
Name | Description |
---|---|
T |
Constructors
SyntaxNodeRewriter()
create a new instance of SyntaxNodeRewriter<T>
Declaration
protected SyntaxNodeRewriter()
Properties
Instance
Gets the single global instance of SyntaxNodeRewriter<T>.
Declaration
public static SyntaxNodeRewriter<T> Instance { get; }
Property Value
Type | Description |
---|---|
The single global instance of SyntaxNodeRewriter<T>. |
Methods
CountChildren(T)
Declaration
public int CountChildren(T value)
Parameters
Type | Name | Description |
---|---|---|
T |
value |
Returns
Type | Description |
---|---|
GetChildren(Span<T>, T)
Declaration
public void GetChildren(Span<T> children, T value)
Parameters
Type | Name | Description |
---|---|---|
Span<T> |
children |
|
T |
value |
SetChildren(ReadOnlySpan<T>, T)
Declaration
public T SetChildren(ReadOnlySpan<T> newChildren, T oldValue)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<T> |
newChildren |
|
T |
oldValue |
Returns
Type | Description |
---|---|
T |