BenchGen
BenchGen is a tool for generating benchmarks to stress-test a computing system.
Loading...
Searching...
No Matches
ast.cpp File Reference
#include "ast.h"
Include dependency graph for ast.cpp:

Functions

void printIndentationSpaces (int indent)
 Prints a specified number of indentation spaces.
 
std::string generateIfCondition (Generator &generator)
 Generates a condition string for an if statement.
 

Function Documentation

◆ generateIfCondition()

std::string generateIfCondition ( Generator & generator)

Generates a condition string for an if statement.

Generates a condition based on the generator's current context, either returning a random condition or a condition based on PATH variables.

Parameters
generatorThe generator object used to track the current state of code generation.
Returns
A string representing the generated condition.

◆ printIndentationSpaces()

void printIndentationSpaces ( int indent)

Prints a specified number of indentation spaces.

Used for formatting output to visualize the structure of the AST.

Parameters
indentThe number of spaces to print.