Sawmill

Class SyntaxNodeRewriter<T>

An implementation of IRewriter<T> for sublcasses of SyntaxNode.

Inheritance
  • Object
  • SyntaxNodeRewriter<T>
Implements
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

SyntaxNodeRewriter<T>

The single global instance of SyntaxNodeRewriter<T>.

Methods

CountChildren(T)

CountChildren(T)
Declaration
public int CountChildren(T value)
Parameters
Type Name Description

T

value

Returns
Type Description

Int32

GetChildren(Span<T>, T)

GetChildren(Span<T>, T)
Declaration
public void GetChildren(Span<T> childrenReceiver, T value)
Parameters
Type Name Description

Span<T>

childrenReceiver

T

value

SetChildren(ReadOnlySpan<T>, T)

SetChildren(ReadOnlySpan<T>, T)
Declaration
public T SetChildren(ReadOnlySpan<T> newChildren, T value)
Parameters
Type Name Description

ReadOnlySpan<T>

newChildren

T

value

Returns
Type Description

T

Implements

IRewriter<T>