Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::ParseTreePrinter Class Reference

A printer for Bond parse trees. More...

#include <bond/tools/parsetreeprinter.h>

Public Member Functions

void Print (const ParseNode *parseNode, OutputStream &stream)
 Prints a parse tree rooted at a single parse node.
void PrintList (const ListParseNode *listNode, OutputStream &stream)
 Prints a parse tree represented as a list of parse nodes.

Detailed Description

A printer for Bond parse trees.

ParseTreePrinter writes a structural representation of parsed Bond source code to an OutputStream.

See also
ParseNode, ListParseNode, OutputStream

Member Function Documentation

◆ Print()

void Bond::ParseTreePrinter::Print ( const ParseNode * parseNode,
OutputStream & stream )

Prints a parse tree rooted at a single parse node.

Parameters
parseNodeRoot parse node to print.
streamOutput stream receiving the parse tree text.

◆ PrintList()

void Bond::ParseTreePrinter::PrintList ( const ListParseNode * listNode,
OutputStream & stream )

Prints a parse tree represented as a list of parse nodes.

Parameters
listNodeHead of the parse node list to print.
streamOutput stream receiving the parse tree text.

The documentation for this class was generated from the following file:
  • include/bond/tools/parsetreeprinter.h