Nearly CC
An educational compiler skeleton
Public Member Functions | List of all members
ASTTreePrint Class Reference

Support for printing a text representation of an AST. More...

#include "ast.h"

Inheritance diagram for ASTTreePrint:
Inheritance graph
[legend]
Collaboration diagram for ASTTreePrint:
Collaboration graph
[legend]

Public Member Functions

virtual std::string node_tag_to_string (int tag) const
 Override to convert a parse node's tag to a string. More...
 
void print (Node *t) const
 

Detailed Description

Support for printing a text representation of an AST.

Member Function Documentation

◆ node_tag_to_string()

std::string ASTTreePrint::node_tag_to_string ( int  tag) const
virtual

Override to convert a parse node's tag to a string.

Parameters
tagparse node tag value
Returns
the string representation of the parse node tag (i.e., the GrammarSymbol)

Reimplemented from ParseTreePrint.


The documentation for this class was generated from the following files: