BenchGen
BenchGen is a tool for generating benchmarks to stress-test a computing system.
Loading...
Searching...
No Matches
Node Class Referenceabstract

Base class for all nodes in the abstract syntax tree (AST). More...

#include <ast.h>

Inheritance diagram for Node:

Public Member Functions

virtual ~Node ()=default
 
virtual void gen (Generator &)=0
 Generates code for this AST node.
 
virtual void print (int indent=0)=0
 Prints the structure of this AST node.
 

Detailed Description

Base class for all nodes in the abstract syntax tree (AST).

Defines the interface for generating code and printing the AST structure.

Constructor & Destructor Documentation

◆ ~Node()

virtual Node::~Node ( )
virtualdefault

Member Function Documentation

◆ gen()

virtual void Node::gen ( Generator & )
pure virtual

Generates code for this AST node.

Parameters
generatorThe generator object used to manage code generation.

Implemented in Call, CodeElse, Contains, Id, If, IfParam, Insert, LambdaCode, Loop, New, Remove, Seq, and StatementCode.

◆ print()

virtual void Node::print ( int indent = 0)
pure virtual

Prints the structure of this AST node.

Parameters
indentThe number of spaces to indent the output.

Implemented in Call, CodeElse, Contains, Id, If, IfParam, Insert, LambdaCode, Loop, New, Remove, Seq, and StatementCode.


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