MrKWatkins.Ast Help

Replacer<TBaseNode, TNode, TReplacementNode> Class

Definition

An OrderedProcessor<TNode> for optionally replacing nodes of a specific type in a tree with new nodes of a specific type.

public abstract class Replacer<TBaseNode, TNode, TReplacementNode> : OrderedProcessor<TBaseNode, TNode> where TBaseNode : Node<TBaseNode> where TNode : TBaseNode where TReplacementNode : TBaseNode

Type Parameters

Name

Description

TBaseNode

The base type of nodes in the tree.

TNode

The type of nodes to process.

TReplacementNode

The type of the replacement nodes.

Constructors

Name

Description

Replacer()

Properties

Name

Description

ProcessReplacements

If set to true then replacement nodes and their children will be processed too. Defaults to false.

Methods

Name

Description

ProcessNode(TNode)

ReplaceNode(TNode)

Optionally replace the specified node.

Last modified: 22 November 2024