Class AstVisualizer

Namespace
LogicalOptimizer
Assembly
LogicalOptimizer.Core.dll

Renders an AST as a human-readable tree (box-drawing characters) for diagnostics.

public static class AstVisualizer
Inheritance
AstVisualizer
Inherited Members

Methods

GetCompactVisualization(AstNode)

The expression string followed by its VisualizeTree(AstNode, string, bool) rendering.

public static string GetCompactVisualization(AstNode node)

Parameters

node AstNode

Returns

string

VisualizeTree(AstNode, string, bool)

ASCII-art tree of the node and its descendants, one node per line.

public static string VisualizeTree(AstNode node, string prefix = "", bool isLast = true)

Parameters

node AstNode
prefix string
isLast bool

Returns

string